[llvm] 6fd9c19 - [PowerPC] Fix typo in vector shuffle combining
Qiu Chaofan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 23:35:58 PDT 2021
Author: Qiu Chaofan
Date: 2021-07-13T14:35:47+08:00
New Revision: 6fd9c1901f40c1e9beceff67e05570afe2914e65
URL: https://github.com/llvm/llvm-project/commit/6fd9c1901f40c1e9beceff67e05570afe2914e65
DIFF: https://github.com/llvm/llvm-project/commit/6fd9c1901f40c1e9beceff67e05570afe2914e65.diff
LOG: [PowerPC] Fix typo in vector shuffle combining
a22ecb4 fixed a crash on big endian subtargets. This commit fixes a typo
in that commit which may cause miscompile.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index ecdc1fb61e3f..094b50e15a03 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -14530,7 +14530,7 @@ SDValue PPCTargetLowering::combineVectorShuffle(ShuffleVectorSDNode *SVN,
unsigned ValidLaneWidth =
SToVLHS ? SToVLHS.getValueType().getScalarSizeInBits() /
LHS.getValueType().getScalarSizeInBits()
- : SToVRHS.getValueType().getVectorNumElements() /
+ : SToVRHS.getValueType().getScalarSizeInBits() /
RHS.getValueType().getScalarSizeInBits();
// Initially assume that neither input is permuted. These will be adjusted
More information about the llvm-commits
mailing list