[PATCH] D145157: [InstCombine] Implement "A & (~A | B) --> A & B" like transforms for boolean based selects.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 5 08:04:21 PST 2023
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/test/Transforms/InstCombine/logical-select.ll:1144
; A & (~A | B) --> A & B
define i1 @test1_variant1(i1 %a, i1 %b) {
; CHECK-LABEL: @test1_variant1(
----------------
Nit: the code comments describe what the tests are checking, so that's good, but we still prefer that tests have a more meaningful name vs. generic "testN". I'd call all of the tests in this set something like "logical_and_or_with_common_not_op" or something like that.
Then the conjugated logic set that ends in `or` would be "logical_or_and_with_common_not_op".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145157/new/
https://reviews.llvm.org/D145157
More information about the llvm-commits
mailing list