diff options
-rw-r--r-- | llvm/lib/Target/BPF/BPFISelLowering.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/BPF/BPFISelLowering.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp index 194996989e5..0d604e099c3 100644 --- a/llvm/lib/Target/BPF/BPFISelLowering.cpp +++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp @@ -713,3 +713,8 @@ EVT BPFTargetLowering::getSetCCResultType(const DataLayout &, LLVMContext &, EVT VT) const { return getHasAlu32() ? MVT::i32 : MVT::i64; } + +MVT BPFTargetLowering::getScalarShiftAmountTy(const DataLayout &DL, + EVT VT) const { + return (getHasAlu32() && VT == MVT::i32) ? MVT::i32 : MVT::i64; +} diff --git a/llvm/lib/Target/BPF/BPFISelLowering.h b/llvm/lib/Target/BPF/BPFISelLowering.h index badc0b82c16..3eb099cf369 100644 --- a/llvm/lib/Target/BPF/BPFISelLowering.h +++ b/llvm/lib/Target/BPF/BPFISelLowering.h @@ -60,6 +60,8 @@ public: EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override; + MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override; + private: // Control Instruction Selection Features bool HasAlu32; |