diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2020-07-25 20:28:52 -0400 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-07-27 16:26:05 +0200 |
commit | eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29 (patch) | |
tree | 1e41849ac6fc42e6ec9c9d894adf80ee0d0277dd | |
parent | ca49a47b8f87fb942be7c043da2000375346d8b4 (diff) | |
download | llvm-eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29.zip llvm-eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29.tar.gz llvm-eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29.tar.bz2 |
[PowerPC][NFC] Fix an assert that cannot trip from 7d076e19e31a
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 cdead4f89c0eecf11f50092bc088e3a9c6511825)
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 980b5ea..5c1a4cb 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -9292,7 +9292,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)) { @@ -9930,7 +9931,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"); } |