[PATCH] D42424: [InstCombine] Allow common type conversions to i8/i16

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 28 12:20:29 PST 2018


kparzysz added a comment.

In https://reviews.llvm.org/D42424#989980, @dmgreen wrote:

> Krzysztof, thanks for the info. It sounds like having a canonical representation we all agree on would be a hard problem to solve :) I thinks that is how this all began, wanting a canonicalisation of selects vs cfg that played better with GVN/similar passes.


What I want out of the canonical form is predictability.  I could not care less if it's suboptimal, I just want to have a form that I can match against, and only at a specified point in the optimization sequence.  All the aggressive optimizations can still happen, but after idiom recognizers had their chance to take a look at the code.  In other words, I'd advocate to split these transformations that make code look predictable from those that make it optimized.

Going back to this issue.  I'm not opposed to the change itself, if it enables more things to happen then it sounds like a good idea.  At the same time we (Hexagon) cannot give up that LIR pass. If it's only a question of truncates, it may be easy to change the LIR code, but I don't want to be finding myself in this situation over and over again.  The current model simply does not support idiom recognition.


https://reviews.llvm.org/D42424





More information about the llvm-commits mailing list