[PATCH] D38378: Optimize {s|u}add.with.overflow on ARM.

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 12:39:31 PDT 2017


jgalenson created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

The ARM backend contains code that tries to optimize compares by replacing them with an existing instruction that sets the flags the same way.  This allows it to replace a "cmp" with a "adds", generalizing the code that replaces "cmp" with "sub".  It also heuristically disables sinking of instructions that could potentially be used to replace compares (currently only if they're next to each other).


https://reviews.llvm.org/D38378

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38378.117039.patch
Type: text/x-patch
Size: 10712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170928/1fe4cb5e/attachment.bin>


More information about the llvm-commits mailing list