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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 18 12:46:17 PST 2018

RKSimon added a comment.

I noticed MSP430, did you see anything else? Everything else seemed to default to i32 which should be OK.

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;
craig.topper wrote:
> Is VT ever not a scalar here? Can we use getSizeInBits instead of getScalarSizeInBits()? Maybe with an assert.
It shouldn't ever be anything but a scalar, but we don't do much to check for it I agree. An assert it is.



More information about the llvm-commits mailing list