[llvm] [CGP]: Optimize mul.overflow. (PR #148343)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 07:59:38 PDT 2025
================
@@ -322,8 +322,11 @@ class AArch64TargetLowering : public TargetLowering {
}
// Return true if the target wants to optimize the mul overflow intrinsic
- // by detecting if there is no overflow.
- bool shouldOptimizeMulOverflowIntrinsic() const override { return true; }
+ // for the given \p VT.
+ bool shouldOptimizeMulOverflowIntrinsic(LLVMContext &Context,
+ EVT VT) const override {
+ return getTypeAction(Context, VT) == TypeExpandInteger;
----------------
davemgreen wrote:
Does this just mean VT == MVT::i64? Does it apply to vector types? It might be simpler to be explicit.
https://github.com/llvm/llvm-project/pull/148343
More information about the llvm-commits
mailing list