[PATCH] D51362: [GlobalISel][IRTranslator] Canonicalize G_ICMP to have constant operands last

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 10:16:01 PDT 2018


aemerson added a comment.

In https://reviews.llvm.org/D51362#1219573, @qcolombet wrote:

> Going back to a higher-level description for all that stuff, I wonder if ISel could already handle this.
>
> Indeed, it seems easy, at least conceptually, to teach tablegen to check for the commuted patterns to get the immediate version whenever possible before trying the non-immediate variant.


It can't do that all the time, with these G_ICMPs for example it also has to swap the predicate (not that we even have imported patterns that could possibly match for AArch64).


Repository:
  rL LLVM

https://reviews.llvm.org/D51362





More information about the llvm-commits mailing list