[PATCH] D57789: [CGP] form usub with overflow from sub+icmp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 06:36:39 PST 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: test/CodeGen/PowerPC/bdzlr.ll:57
 ; CHECK: bnelr
-; CHECK: bdzlr
+; CHECK: bnelr
 ; CHECK-NOT: blr
----------------
nemanjai wrote:
> I have to look at the entire codegen here a little more closely. The reason I think this requires deeper investigation is that it is changing a branch from the CTR-decrementing `bdzlr` to the `bnelr` that doesn't touch the CTR. So I want to make sure we are not preventing the formation of CTR loops by this change.
Thanks. If this looks like a regression, then we're probably better off adding a TLI hook to guard against this (and the existing UADDO) transforms. That would let me remove the SAD hack and allow targets to enable this at their convenience.

D57833 also suggests that might be the better (more conservative) way forward. 

@dmgreen @arsenm @nhaehnle - any preference/thoughts about that?


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

https://reviews.llvm.org/D57789





More information about the llvm-commits mailing list