[PATCH] D35635: Optimize {s,u}{add,sub}.with.overflow on ARM

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 16:10:45 PDT 2017


jgalenson updated this revision to Diff 115914.
jgalenson added a comment.

Now that https://reviews.llvm.org/D35192 has landed, I've rebased this patch on top of it.

The existing patch actually applied cleanly and worked.  However, the two unsigned cases generated slightly worse code (still better than in-tree, however).  I managed to improve the uadd case by having getARMXALUOp return an ADDC instead of an ADD, but this did not work for the usub case (although I left the change).  There's probably a way to fix the usub case, but I'm not worried much about it because my follow-up patch that modifies ARMBaseInstrInfo::optimizeCompareInstr handles it.

So does this change to getARMXALUOp look correct?


https://reviews.llvm.org/D35635

Files:
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  test/CodeGen/ARM/su-addsub-overflow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35635.115914.patch
Type: text/x-patch
Size: 9330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/998714c4/attachment.bin>


More information about the llvm-commits mailing list