[PATCH] D158983: [InstCombine] Fold two select patterns into or-and

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 07:30:52 PDT 2023


nikic added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/select-and-or.ll:629
+
+define i1 @or_and1_bundef(i1 %a, i1 noundef %b, i1 %c) {
+; CHECK-LABEL: @or_and1_bundef(
----------------
noundef on b seems irrelevant, did you mean to put it on a?


================
Comment at: llvm/test/Transforms/InstCombine/select-and-or.ll:653
+
+define i1 @no_or_and1_bundef(i1 %a, i1 noundef %b, i1 %c) {
+; CHECK-LABEL: @no_or_and1_bundef(
----------------
Drop noundef from these tests and call them `_multiuse`.


================
Comment at: llvm/test/Transforms/InstCombine/select-and-or.ll:697
+
+define i1 @or_and2_op1not(i1 %a, i1 %c) {
+; CHECK-LABEL: @or_and2_op1not(
----------------
Is this supposed to be a commuted test? If so, put it next to the original test and make it `_commuted`.


================
Comment at: llvm/test/Transforms/InstCombine/select-and-or.ll:711
+
+define i1 @neg_or_and1(i1 %a, i1 %b, i1 %c, i1 %d) {
+; CHECK-LABEL: @neg_or_and1(
----------------
Something is wrong with these negative tests. You have an unused variable `%a`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158983/new/

https://reviews.llvm.org/D158983



More information about the llvm-commits mailing list