[PATCH] D40148: [AMDGPU] Fix DAGTypeLegalizer::SplitInteger for shift amount type

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 09:54:15 PST 2017


RKSimon accepted this revision.
RKSimon added a comment.

LGTM with one minor



================
Comment at: lib/Target/X86/X86ISelLowering.h:669
+    MVT getScalarShiftAmountTy(const DataLayout &, EVT VT) const override {
+      return VT.getSizeInBits() >= 512 ? MVT::i16 : MVT::i8;
     }
----------------
Please can you put in an assert to check that the return type is big enough to hold the max shift value for VT.


https://reviews.llvm.org/D40148





More information about the llvm-commits mailing list