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

Juneyoung Lee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 3 18:18:55 PDT 2021


aqjune added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/or.ll:1102
+; CHECK-NEXT:    [[AND:%.*]] = select i1 [[Y]], i1 [[X]], i1 false
+; CHECK-NEXT:    [[OR:%.*]] = select i1 [[X_INV]], i1 true, i1 [[AND]]
 ; CHECK-NEXT:    ret i1 [[OR]]
----------------
nikic wrote:
> Can be salvaged: https://alive2.llvm.org/ce/z/-STJ2d
> 
> I thought this was already covered by one of the folds though...
No, it didn't exist.
I think there are too many possible combinations here. It should be reduced into more compact code someday...
Made a patch here: D101807


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