[PATCH] D19178: Broaden FoldItoFPtoI to try and establish whether the integer value fits into the float type
Carlos Liam via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 13:53:43 PDT 2016
aarzee created this revision.
aarzee added reviewers: majnemer, scanon, escha.
aarzee added a subscriber: llvm-commits.
Previously, FoldItoFPtoI would only check if the width of the integer type fits into the width of the mantissa. This change will now let it fold if it can establish that the actual value of the integer fits within the floating point type (both mantissa and exponent are considered).
Was originally D19177, but was notified on IRC that since I didn't add llvm-commits as a subscriber, it wouldn't show up on that list.
http://reviews.llvm.org/D19178
Files:
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/sitofp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19178.53948.patch
Type: text/x-patch
Size: 4426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160415/3cf28878/attachment.bin>
More information about the llvm-commits
mailing list