Skip to content

Commit 5b07750

Browse files
committed
[Transforms] Silence a warning in SROA.cpp (NFC)
/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5526:48: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses] if (!SI->isSimple() || PartitionType && UserTy != PartitionType) ~~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5526:48: note: place parentheses around the '&&' expression to silence this warning if (!SI->isSimple() || PartitionType && UserTy != PartitionType) ^ ( ) 1 error generated.
1 parent a611d67 commit 5b07750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5523,7 +5523,7 @@ bool SROA::propagateStoredValuesToLoads(AllocaInst &AI, AllocaSlices &AS) {
55235523
Insts.push_back(User);
55245524
} else if (auto *SI = dyn_cast<StoreInst>(User)) {
55255525
Type *UserTy = SI->getValueOperand()->getType();
5526-
if (!SI->isSimple() || PartitionType && UserTy != PartitionType)
5526+
if (!SI->isSimple() || (PartitionType && UserTy != PartitionType))
55275527
AllSameAndValid = false;
55285528
PartitionType = UserTy;
55295529
Insts.push_back(User);

0 commit comments

Comments
 (0)