[llvm] [SystemZ] Allow forming overflow op for i128 (PR #153557)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 14 03:53:11 PDT 2025
================
@@ -523,7 +523,7 @@ class SystemZTargetLowering : public TargetLowering {
bool MathUsed) const override {
// Form add and sub with overflow intrinsics regardless of any extra
// users of the math result.
- return VT == MVT::i32 || VT == MVT::i64;
+ return VT == MVT::i32 || VT == MVT::i64 || VT == MVT::i128;
----------------
uweigand wrote:
That looks fine for z13 and higher, but on older machines, `i128` is not actually a legal type, and we have no instructions for 128-bit operflowing ops. The common code `shouldFormOverflowOp` has a `!isOperationExpand(Opcode, VT)` check - I think we need that here for the `i128` case.
https://github.com/llvm/llvm-project/pull/153557
More information about the llvm-commits
mailing list