[PATCH] D68408: [InstCombine] Unfold `sub %x, %y` -> `add (sub 0, %y), %x` IFF `%y` can be freely negated
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 14:30:56 PDT 2019
efriedma added a comment.
> This *is* unusual. Is this too ugly to live?
I'd prefer to actually transform the operation tree at the point we decide it's profitable, to make it clear we can't end up in an infinite loop or something like that. As it is, you're depending on some other transforms happening in a particular order, and it's not clear that will happen consistently. (Yes, it's a little more code, but I think that's okay.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68408/new/
https://reviews.llvm.org/D68408
More information about the llvm-commits
mailing list