[PATCH] D89955: [ValueTracking] Recognize more integer abs idioms

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 02:41:07 PDT 2020


frasercrmck added a comment.

In D89955#2348423 <https://reviews.llvm.org/D89955#2348423>, @nikic wrote:

> This pattern already gets canonicalized by InstCombine (and there are no multi-use problems): https://llvm.godbolt.org/z/od9oq4 As such, it shouldn't be reaching the backend in this form.

That's a good point, thanks. Sadly I don't have access to my motivating example as I've lost access to the code. I suppose it's possible that there was a pass between InstCombine and the SelectionDAG lowering which undid this canonicalization, but it'll be hard to find.

Out of curiosity, what do you mean by multi-use problems? Profitability or correctness?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89955/new/

https://reviews.llvm.org/D89955



More information about the llvm-commits mailing list