[llvm] [X86][APX] Handle AND_NF instruction for compare peephole (PR #136233)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 18 10:43:48 PDT 2025
================
@@ -73,3 +73,36 @@ bb14: ; preds = %bb12
bb16: ; preds = %bb14, %bb11, %bb10, %bb
ret void
}
+
+; Replacement of CMP should happen with SUB not with AND as it is AND_NF
----------------
e-kud wrote:
Yes. I haven't liked this comment too because we don't see sub in the assembly. Reworded it with _We must not try to replace CMP with AND_NF as it sets no flags_. I also double checked the `optimizeCompareInstr`. In other cases we use switches where only `CASE_ND` is used. This one with `isAND` was an exception.
https://github.com/llvm/llvm-project/pull/136233
More information about the llvm-commits
mailing list