[PATCH] "float2int": Add a new pass to demote from float to int where possible.
james.molloy at arm.com
Fri Feb 20 07:58:47 PST 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 25695 bytes
Desc: not available
More information about the llvm-commits