aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2020-05-10 06:59:30 -0400
committerSanjay Patel <spatel@rotateright.com>2020-05-10 07:04:54 -0400
commita62533c29f842ba39c6e47a09b59bb0ae2dcc31b (patch)
tree4bf4d29152763796b17401f5f59fd36f478a4ab7 /clang/lib
parent1d2c1fcf41d32f8f6db312f8e0262291cda4002b (diff)
downloadllvm-a62533c29f842ba39c6e47a09b59bb0ae2dcc31b.zip
llvm-a62533c29f842ba39c6e47a09b59bb0ae2dcc31b.tar.gz
llvm-a62533c29f842ba39c6e47a09b59bb0ae2dcc31b.tar.bz2
[InstCombine] fold fpext into exact integer-to-FP cast
We can combine a floating-point extension cast with a conversion from integer if we know the earlier cast is exact. This is an optimization suggested in PR36617: https://bugs.llvm.org/show_bug.cgi?id=36617#c19 However, this patch does not change the example suggested there. This patch only uses the existing analysis to handle cases where the integer source value magnitude is narrower than the intermediate FP mantissa (guarantees that the conversion to FP is exact). Follow-up patches to the analysis function can enable more cases. Differential Revision: https://reviews.llvm.org/D79116
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions