[PATCH] D90760: [InstCombiner] Make LibCallSimplifier add extension attribute to ldexp arg.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 04:56:19 PST 2020


jonpa created this revision.
jonpa added reviewers: uweigand, xbolva00, hubert.reinterpretcast, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
jonpa requested review of this revision.

When an exp2() or or pow() is replaced by a call to ldexp(), the second integer argument should have the signext or zeroext attribute set (depending
on the conversion instruction opcode preceding the original call).

This was discovered by the SystemZ multistage bot: http://lab.llvm.org:8011/#/builders/8, where wrong code resulted when this extension was not performed.


https://reviews.llvm.org/D90760

Files:
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Transforms/InstCombine/pow_fp_int.ll
  llvm/test/Transforms/InstCombine/simplify-libcalls.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90760.302816.patch
Type: text/x-patch
Size: 6821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201104/0f4c6040/attachment.bin>


More information about the llvm-commits mailing list