[llvm] [InstCombine] simplify `icmp pred x, ~x` (PR #73990)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 9 05:18:14 PST 2023
================
@@ -5,6 +5,327 @@ declare void @llvm.assume(i1)
declare void @barrier()
declare void @use.i8(i8)
+; X s< ~X --> X s< 0
+define i1 @src_slt_xnx_to_slt_0_i1(i1 %x) {
----------------
dtcxzyw wrote:
Please add some tests that commute operands (e.g., `icmp sgt ~X, X`).
And some negative tests (e.g., `icmp sgt X, ~Y`).
https://github.com/llvm/llvm-project/pull/73990
More information about the llvm-commits
mailing list