diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-05-10 06:59:30 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-05-10 07:04:54 -0400 |
commit | a62533c29f842ba39c6e47a09b59bb0ae2dcc31b (patch) | |
tree | 4bf4d29152763796b17401f5f59fd36f478a4ab7 /clang/lib | |
parent | 1d2c1fcf41d32f8f6db312f8e0262291cda4002b (diff) | |
download | llvm-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