aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2015-03-24 11:15:23 +0000
committerJames Molloy <james.molloy@arm.com>2015-03-24 11:15:23 +0000
commit408df5160ca4e51d01d32c7c3e11b34c8150718a (patch)
tree2324021cf8679324be8590c763becf7d2d94ff31 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
parent7cb18bf537ed319eaa06f12ed39f85594bed641a (diff)
downloadllvm-408df5160ca4e51d01d32c7c3e11b34c8150718a.zip
llvm-408df5160ca4e51d01d32c7c3e11b34c8150718a.tar.gz
llvm-408df5160ca4e51d01d32c7c3e11b34c8150718a.tar.bz2
"float2int": Add a new pass to demote from float to int where possible.
It is possible to have code that converts from integer to float, performs operations then converts back, and the result is provably the same as if integers were used. This can come from different sources, but the most obvious is a helper function that uses floats but the arguments given at an inlined callsites are integers. This pass considers all integers requiring a bitwidth less than or equal to the bitwidth of the mantissa of a floating point type (23 for floats, 52 for doubles) as exactly representable in floating point. To reduce the risk of harming efficient code, the pass only attempts to perform complete removal of inttofp/fptoint operations, not just move them around. llvm-svn: 233062
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions