[PATCH] D42951: [CGP] Strength reduce cmp (xor (a, -1), xor(b, -1)) => cmp (b, a)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 12:17:12 PST 2018
efriedma added a comment.
> higher register pressure
You're essentially transforming SELECT_CC(ult, %an, %bn, %an, %bn) to SELECT_CC(ult, %b, %a, %an, %bn); that doesn't help register pressure at all, at least not on its own.
>From your testcase, I guess the problem has something to do with legalization? We could increase register pressure if we zero-extend the operands to the compare, then don't reuse the zero-extended compare operands to produce the result. That seems like a problem we could solve more effectively some other way, though.
https://reviews.llvm.org/D42951
More information about the llvm-commits
mailing list