[llvm] 5983cfd - [X86] LowerRotate - fix assertion. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 6 11:46:37 PST 2021
Author: Simon Pilgrim
Date: 2021-12-06T19:46:22Z
New Revision: 5983cfdc50b3110e3e6856d174e54147f2f6e6e3
URL: https://github.com/llvm/llvm-project/commit/5983cfdc50b3110e3e6856d174e54147f2f6e6e3
DIFF: https://github.com/llvm/llvm-project/commit/5983cfdc50b3110e3e6856d174e54147f2f6e6e3.diff
LOG: [X86] LowerRotate - fix assertion. NFC.
v32i16 rotation lowering is only lowered on non-BWI targets.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index f412292dfd071..660cf626946ba 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -29844,9 +29844,9 @@ static SDValue LowerRotate(SDValue Op, const X86Subtarget &Subtarget,
return splitVectorIntBinary(Op, DAG);
assert((VT == MVT::v4i32 || VT == MVT::v8i16 || VT == MVT::v16i8 ||
- ((VT == MVT::v8i32 || VT == MVT::v16i16 || VT == MVT::v32i8 ||
- VT == MVT::v32i16) &&
- Subtarget.hasAVX2())) &&
+ ((VT == MVT::v8i32 || VT == MVT::v16i16 || VT == MVT::v32i8) &&
+ Subtarget.hasAVX2()) ||
+ (VT == MVT::v32i16 && !Subtarget.useBWIRegs())) &&
"Only vXi32/vXi16/vXi8 vector rotates supported");
// Rotate by an uniform constant - expand back to shifts.
More information about the llvm-commits
mailing list