[clang] [llvm] [ValueTracking] Extend computeConstantRange for add/sub, sext/zext/trunc (PR #181110)

Guy David via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 26 04:53:16 PST 2026


================
@@ -30,27 +30,27 @@ entry:
 
 define zeroext i1 @addiCmpiUnsignedOverflow(i32 zeroext %x) {
 entry:
-  %add = add nuw i32 110, %x 
-  %cmp = icmp ugt i32 %add, 100
+  %add = add nuw i32 110, %x
+  %cmp = icmp ugt i32 %add, 200
----------------
guy-david wrote:

The original comparison became trivially true because the original pattern matching with constants only supported RHS constants. Maybe I'll just switch the operands in the original test.

https://github.com/llvm/llvm-project/pull/181110


More information about the llvm-commits mailing list