[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

Juneyoung Lee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 1 21:58:31 PDT 2021


aqjune added a comment.

I found that there are a few more patterns that can be salvaged. Will create a patch for them.



================
Comment at: llvm/test/Transforms/InstCombine/and.ll:898
 ; CHECK-NEXT:    [[Y:%.*]] = icmp ugt i72 [[C:%.*]], 42
-; CHECK-NEXT:    [[AND:%.*]] = and i1 [[X]], [[Y]]
 ; CHECK-NEXT:    ret i1 [[AND]]
----------------
This can be resurrected.


================
Comment at: llvm/test/Transforms/InstCombine/and.ll:1033
 ; CHECK-NEXT:    [[Y:%.*]] = icmp ugt i32 [[C:%.*]], 42
-; CHECK-NEXT:    [[AND:%.*]] = and i1 [[Y]], [[X_INV]]
 ; CHECK-NEXT:    ret i1 [[AND]]
----------------
This can be resurrected as well.


================
Comment at: llvm/test/Transforms/InstCombine/and2.ll:51
-; CHECK-NEXT:    [[TMP2:%.*]] = and i1 [[TMP1]], [[B:%.*]]
-; CHECK-NEXT:    ret i1 [[TMP2]]
 ;
----------------
This one too


================
Comment at: llvm/test/Transforms/PGOProfile/chr.ll:1374
 ; CHECK-NEXT:    [[V0:%.*]] = icmp eq i32 [[Z:%.*]], 0
-; CHECK-NEXT:    [[V3:%.*]] = and i1 [[V0]], [[PRED:%.*]]
 ; CHECK-NEXT:    br i1 [[V3]], label [[BB0:%.*]], label [[BB1:%.*]], !prof !16
----------------
This one as well


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101191



More information about the cfe-commits mailing list