[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:25 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.
+define i1 @icmp_ult_neg_offset_or_disjoint(i16 %arg) "instcombine-no-verify-fixpoint" {
----------------
nikic wrote:
Please add a brief comment on why the fix point is not reached.
https://github.com/llvm/llvm-project/pull/219904
More information about the llvm-commits
mailing list