[PATCH] D43445: [X86] Improve getScalarShiftAmountTy handling of illegal integer types (PR36250)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 18 11:59:45 PST 2018

craig.topper added a comment.

It looks like this should be broken on some other targets too. What code is changing the shuffle type pre-legalization?

Comment at: lib/Target/X86/X86ISelLowering.h:685
+    MVT getScalarShiftAmountTy(const DataLayout &DL, EVT VT) const override {
+      if (isTypeLegal(VT) || (8 >= Log2_32_Ceil(VT.getScalarSizeInBits())))
+        return MVT::i8;
Is VT ever not a scalar here? Can we use getSizeInBits instead of getScalarSizeInBits()? Maybe with an assert.



More information about the llvm-commits mailing list