Skip to content

Commit cdead4f

Browse files
committed
[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.
1 parent 55dae9c commit cdead4f

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
@@ -9311,7 +9311,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
93119311
if (!BVNIsConstantSplat || SplatBitSize > 32) {
93129312

93139313
bool IsPermutedLoad = false;
9314-
const SDValue *InputLoad = getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
9314+
const SDValue *InputLoad =
9315+
getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
93159316
// Handle load-and-splat patterns as we have instructions that will do this
93169317
// in one go.
93179318
if (InputLoad && DAG.isSplatValue(Op, true)) {
@@ -9949,7 +9950,7 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
99499950
if (IsPermutedLoad) {
99509951
assert(isLittleEndian && "Unexpected permuted load on big endian target");
99519952
SplatIdx += IsFourByte ? 2 : 1;
9952-
assert(SplatIdx < IsFourByte ? 4 : 2 &&
9953+
assert((SplatIdx < (IsFourByte ? 4 : 2)) &&
99539954
"Splat of a value outside of the loaded memory");
99549955
}
99559956

0 commit comments

Comments
 (0)