[PATCH] D159328: [InstCombine][WIP] Don't canonicalize select of bools if it costs an instruction
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 09:16:24 PDT 2023
goldstein.w.n added a comment.
In D159328#4645746 <https://reviews.llvm.org/D159328#4645746>, @nikic wrote:
> I don't think we can do this. Logical and/or is a canonical form that lots of passes rely on, not just InstCombine. We would have to teach all passes that use LogicalAnd/LogicalOr matchers to also support the inverted forms. I don't think that would be worthwhile.
In D159328#4645746 <https://reviews.llvm.org/D159328#4645746>, @nikic wrote:
> I don't think we can do this. Logical and/or is a canonical form that lots of passes rely on, not just InstCombine. We would have to teach all passes that use LogicalAnd/LogicalOr matchers to also support the inverted forms. I don't think that would be worthwhile.
I'm happy to drop this. It was mostly motivated by wanting to fix the regression caused by expanding isFreeToInvert.
I'll see if there is another better way to go about it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159328/new/
https://reviews.llvm.org/D159328
More information about the llvm-commits
mailing list