[llvm-branch-commits] [llvm] [NFC] [IndVarSimplify] add overflowing tests (PR #159877)

Florian Mayer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 22 13:02:57 PDT 2025


https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/159877

>From ebdadaf8b6408c19d66f7a7e8e43146067ec03c0 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Fri, 19 Sep 2025 16:39:45 -0700
Subject: [PATCH 1/2] ixup

Created using spr 1.3.4
---
 llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll b/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
index b5f8f9ece6809..8f8ea97132461 100644
--- a/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
+++ b/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
@@ -137,9 +137,6 @@ for.body:                                         ; preds = %entry, %cont
   store i8 0, ptr %arrayidx, align 1
   %0 = tail call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 %i.04, i32 1)
   %1 = extractvalue { i32, i1 } %0, 1
-; It is theoretically possible to prove this, but SCEV cannot
-; represent non-unsigned-wrapping subtraction operations.
-
 ; CHECK: for.body:
 ; CHECK-NOT: @llvm.ssub.with.overflow.i32
 ; CHECK: br i1 false, label %trap, label %cont, !nosanitize !0

>From 14cdd31f03fe9c206dcbb918c112936184d394a4 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Fri, 19 Sep 2025 16:40:34 -0700
Subject: [PATCH 2/2] fmt

Created using spr 1.3.4
---
 llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll b/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
index 8f8ea97132461..6af959e47b12e 100644
--- a/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
+++ b/llvm/test/Transforms/IndVarSimplify/X86/overflow-intrinsics.ll
@@ -121,7 +121,6 @@ cont:                                             ; preds = %for.body
   br i1 %cmp, label %for.body, label %for.cond.cleanup
 }
 
-
 define void @f_ssub(ptr nocapture %a) {
 ; CHECK-LABEL: @f_ssub(
 entry:



More information about the llvm-branch-commits mailing list