Skip to content

Commit eb3f43b

Browse files
nemanjaizmodem
authored andcommitted
[PowerPC][NFC] Fix an assert that cannot trip from 7d076e1
I mixed up the precedence of operators in the assert and thought I had it right since there was no compiler warning. This just adds the parentheses in the expression as needed. (cherry picked from commit cdead4f)
1 parent ca49a47 commit eb3f43b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9292,7 +9292,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
92929292
if (!BVNIsConstantSplat || SplatBitSize > 32) {
92939293

92949294
bool IsPermutedLoad = false;
9295-
const SDValue *InputLoad = getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
9295+
const SDValue *InputLoad =
9296+
getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
92969297
// Handle load-and-splat patterns as we have instructions that will do this
92979298
// in one go.
92989299
if (InputLoad && DAG.isSplatValue(Op, true)) {
@@ -9930,7 +9931,7 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
99309931
if (IsPermutedLoad) {
99319932
assert(isLittleEndian && "Unexpected permuted load on big endian target");
99329933
SplatIdx += IsFourByte ? 2 : 1;
9933-
assert(SplatIdx < IsFourByte ? 4 : 2 &&
9934+
assert((SplatIdx < (IsFourByte ? 4 : 2)) &&
99349935
"Splat of a value outside of the loaded memory");
99359936
}
99369937

0 commit comments

Comments
 (0)