[PATCH] D42951: [CGP] Strength reduce cmp (xor (a, -1), xor(b, -1)) => cmp (b, a)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 09:52:53 PST 2018


spatel added a comment.

In https://reviews.llvm.org/D42951#999292, @dmgreen wrote:

> Thanks for taking a look. I've been looking into this more today. At finding a sensible target hook to put this behind and/or perhaps making it more specific.  It's a great shame I can't just do this in ISel (right?), after selection has happened.


Can you file (or maybe it's already filed?) a bug report that shows the output for the ARM/Thumb target where things are falling apart? I can see it being harder to match in the DAG, but it's not clear to me why we can't do it. Another possibility is trying to switch the operands around in MachineCombiner if we can show some kind of win via MachineTraceMetrics.


https://reviews.llvm.org/D42951





More information about the llvm-commits mailing list