[llvm] [BPF] Use mul for certain div/mod operations (PR #110712)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 12:55:57 PDT 2024
================
@@ -118,7 +118,9 @@ class BPFTargetLowering : public TargetLowering {
return Op.size() >= 8 ? MVT::i64 : MVT::i32;
}
- bool isIntDivCheap(EVT VT, AttributeList Attr) const override { return true; }
+ bool isIntDivCheap(EVT VT, AttributeList Attr) const override {
+ return false;
----------------
4ast wrote:
>
> Do we also need to add some generic lowering for cpuv{1,2,3}?
you mean to lower sdiv into udiv plus conditionals ?
It's doable, but let's do it in the separate patch and it's not a high priority imo.
https://github.com/llvm/llvm-project/pull/110712
More information about the llvm-commits
mailing list