forked from OSchip/llvm-project
[PowerPC][NFC] Fix an assert that cannot trip from 7d076e19e3
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.
This commit is contained in:
parent
55dae9c20c
commit
cdead4f89c
|
@ -9311,7 +9311,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
|
|||
if (!BVNIsConstantSplat || SplatBitSize > 32) {
|
||||
|
||||
bool IsPermutedLoad = false;
|
||||
const SDValue *InputLoad = getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
|
||||
const SDValue *InputLoad =
|
||||
getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
|
||||
// Handle load-and-splat patterns as we have instructions that will do this
|
||||
// in one go.
|
||||
if (InputLoad && DAG.isSplatValue(Op, true)) {
|
||||
|
@ -9949,7 +9950,7 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
|
|||
if (IsPermutedLoad) {
|
||||
assert(isLittleEndian && "Unexpected permuted load on big endian target");
|
||||
SplatIdx += IsFourByte ? 2 : 1;
|
||||
assert(SplatIdx < IsFourByte ? 4 : 2 &&
|
||||
assert((SplatIdx < (IsFourByte ? 4 : 2)) &&
|
||||
"Splat of a value outside of the loaded memory");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue