[PATCH] D63958: [SDAG] commute setcc operands to match a subtract

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 07:42:15 PDT 2019


jpienaar added a comment.

In D63958#1564692 <https://reviews.llvm.org/D63958#1564692>, @spatel wrote:

> In D63958#1564460 <https://reviews.llvm.org/D63958#1564460>, @RKSimon wrote:
>
> > Apart from the Lanai code (which like @spatel I know very little about) everything LGTM
>
>
> I'm not finding any docs for this target other than the code in LLVM itself. Discussion about whether this target should be included in LLVM from when it first appeared in trunk:
>  http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html
>
> From commit activity, maybe only @jpienaar can say what is happening on that target?
>
> FWIW, there's a more involved version of this transform already in IR (in instcombine although that seems misplaced to me) - see "swapMayExposeCSEOpportunities()".


There is also http://g.co/lanai/isa . I'll try to patch and see what is happening with this change, the test seems suspicious given the change in select op without change to sub.f operands.



================
Comment at: llvm/test/CodeGen/Lanai/sub-cmp-peephole.ll:28
 ; CHECK-NEXT:    sub.f %r7, %r6, %r3
-; CHECK-NEXT:    sel.lt %r3, %r0, %rv
+; CHECK-NEXT:    sel.gt %r3, %r0, %rv
 ; CHECK-NEXT:    ld -4[%fp], %pc ! return
----------------
The select compare changes, but the operands to the subtract doesn't, that seems weird.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63958/new/

https://reviews.llvm.org/D63958





More information about the llvm-commits mailing list