bpf: Support i32 in getScalarShiftAmountTy method
getScalarShiftAmount method should be implemented for eBPF backend to make sure shift amount could still get correct type once 32-bit subregisters support are enabled. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 325986
This commit is contained in:
parent
59fc805c7e
commit
63cf273f55
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue