[PATCH] Strength reduce intrinsics with overflow into regular arithmetic operations if possible.

Erik Eckstein eeckstein at apple.com
Tue Dec 2 05:08:12 PST 2014


Hi bkramer,

Some intrinsics, like s/uadd.with.overflow and umul.with.overflow, are already strength reduced.
This change adds other arithmetic intrinsics: s/usub.with.overflow, smul.with.overflow.
It completes the work on PR20194.

Beside that, I did also a refactoring: I extracted the creation of the resulting struct in to a separate function CreateOverflowResult().

http://reviews.llvm.org/D6477

Files:
  lib/Transforms/InstCombine/InstCombine.h
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6477.16805.patch
Type: text/x-patch
Size: 14620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141202/52748a85/attachment.bin>


More information about the llvm-commits mailing list