[PATCH] D138490: [SelectOpt] Don't treat LogicalAnd/LogicalOr as selects
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 04:21:38 PST 2022
dmgreen created this revision.
dmgreen added reviewers: apostolakis, davidxl, SjoerdMeijer.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.
A `select i1 %c, i1 true, i1 %d` is just an `or` and a `select i1 %c, i1 %d, i1 false` is just an `and`. There are better treated as such in the logic of SelectOpt, allowing the backend to optimize them to and/or directly.
https://reviews.llvm.org/D138490
Files:
llvm/lib/CodeGen/SelectOptimize.cpp
llvm/test/CodeGen/AArch64/selectopt-logical.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138490.477130.patch
Type: text/x-patch
Size: 7469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221122/866936be/attachment.bin>
More information about the llvm-commits
mailing list