From 6fd9c1901f40c1e9beceff67e05570afe2914e65 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Tue, 13 Jul 2021 14:32:30 +0800 Subject: [PATCH] [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. --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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