[all-commits] [llvm/llvm-project] 15915f: [InstCombine] Implement "A & (~A | B) --> A & B" l...
paulwalker-arm via All-commits
all-commits at lists.llvm.org
Mon Mar 6 06:10:31 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 15915fa10aa6f25f4d44f0b4744f1c65782790c0
https://github.com/llvm/llvm-project/commit/15915fa10aa6f25f4d44f0b4744f1c65782790c0
Author: Paul Walker <paul.walker at arm.com>
Date: 2023-03-06 (Mon, 06 Mar 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
M llvm/test/Transforms/InstCombine/logical-select.ll
Log Message:
-----------
[InstCombine] Implement "A & (~A | B) --> A & B" like transforms for boolean based selects.
Alive2 links for "A & (~A | B) --> A & B":
https://alive2.llvm.org/ce/z/oKiodu (scalar)
https://alive2.llvm.org/ce/z/8yn8GL (vector)
Alive2 links for "A | (~A & B) --> A | B"
https://alive2.llvm.org/ce/z/v5GEKu (scalar)
https://alive2.llvm.org/ce/z/wvtJsj (vector)
NOTE: The commutative variants of these transforms, for example:
"(~A | B) & A --> A & B"
are already handled by simplifying the underlying selects to
normal logical operations due to that combination having simpler
poison semantics.
Differential Revision: https://reviews.llvm.org/D145157
More information about the All-commits
mailing list