[PATCH] D96945: [InstCombine] Add simplification of two logical and/ors

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 09:02:20 PST 2021


aqjune added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/select-safe-bool-transforms.ll:266
-; CHECK-NEXT:    [[TMP1:%.*]] = and i1 [[A:%.*]], [[B:%.*]]
-; CHECK-NEXT:    ret i1 [[TMP1]]
 ;
----------------
nikic wrote:
> The previous output here was wrong. Do you know what caused that fold? Maybe there is something more we need to disable.
It is here: https://github.com/llvm/llvm-project/blob/99108c791de0285ee726a10e8274772b18cee73c/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L2893
I'll push a commit that fixes this by using CreateLogicalAnd if -instcombine-unsafe-select-transform is zero.
Similarly for the or one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96945



More information about the llvm-commits mailing list