[PATCH] D31182: [InstCombine] fadd double (sitofp x), y check that the promotion is valid

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 05:00:23 PDT 2017


apilipenko created this revision.

Doing these transformations check that the result of integer addition is representable in the FP type.
(fadd double (sitofp x), fpcst) --> (sitofp (add int x, intcst))
(fadd double (sitofp x), (sitofp y)) --> (sitofp (add int x, y))

This is a fix for https://bugs.llvm.org//show_bug.cgi?id=27036


https://reviews.llvm.org/D31182

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  test/Transforms/InstCombine/add-sitofp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31182.92458.patch
Type: text/x-patch
Size: 4988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170321/60ef0ff0/attachment.bin>


More information about the llvm-commits mailing list