[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
Wed Aug 29 15:49:25 PDT 2018


aemerson added a comment.

In https://reviews.llvm.org/D51362#1218451, @rtereshin wrote:

> In https://reviews.llvm.org/D51362#1218394, @aemerson wrote:
>
> > I'm not against a separate IR canonicalization stage, even though it's a bit overkill for this particular case. At the moment it looks like InstCombine is doing the canonicalizaton for this case, so re-running that is out of the question. A new pass looks to be on the cards. Anyone else have opinions on this?
>
>
> Does that mean that something after the last InstCombine produces icmp's with the non-canonical operand order? If so maybe that something needs to be chased down and fixed instead.


No, I meant that with -O1 instcombine is the pass that's currently doing the transformation. At -O0 IC doesn't run at all, it's codegen that's handling it for fastisel/sdisel.


Repository:
  rL LLVM

https://reviews.llvm.org/D51362





More information about the llvm-commits mailing list