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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 28 09:59:27 PST 2018


spatel 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.
>
> It appears that the loop idiom recogniser is not picking this up because it does not know how to handle the trunc's that are now part of the CFG. There seem to be a number of changes in the IR going into the idiom recogniser, like doing icmp eq 1 vs icmp eq 0, doing and(xor()) vs xor(and()), etc. They are all being handled fine, except for the new trunk nodes it just doesn't know anything about.


I'm not familiar with LIR, but if this isn't matching for Hexagon now, then isn't it already a problem for other targets? Ie, aren't we failing to recognize the idiom for x86 because it must already be transformed into the form that is not recognized? Is it difficult/undesirable to make the matching more flexible?


https://reviews.llvm.org/D42424





More information about the llvm-commits mailing list