[llvm] [InstCombine] Do not apply unsigned sub identities when flipping icmp strictness in `foldICmpBinOp` (PR #219904)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 02:09:24 PDT 2026
================
@@ -2122,6 +2122,44 @@ define i1 @icmp_ule_offset_with_common_divisor(i64 %x, i64 %y) {
ret i1 %cmp
}
+; Ensure the identity icmp ult (A - B), Op1 to icmp ule A, Op1 does not occur
+; when the or disjoint is matched as an add, as nuw of add does not imply nowrap
+; of the unsigned subtraction.
+; FIXME: This is a miscompilation.
----------------
nikic wrote:
Drop FIXME.
https://github.com/llvm/llvm-project/pull/219904
More information about the llvm-commits
mailing list