[llvm-dev] clang 4.0.0: Invalid code for builtin floating point function with -mfloat-abi=hard -ffast-math (ARM)

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 29 15:15:15 PDT 2017


On 29 March 2017 at 02:33, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> sin/cos are libm functions, and so a libcall to those need to honour the
> floating point ABI requests.  The calling convention to be followed there
> should match `-mfloat-abi` (that is, -mfloat-abi=hard => AAPCS/VFP,
> -mfloat-abi=soft => AAPCS).

Exactly, but they're not, and that's the problem. Do you have any idea
why -ffast-math would change their PCS for libc calls?

The behaviour seems to have been by your patch
(https://reviews.llvm.org/rL291909), so maybe there's some
transformation that uses the run-time functions, or some other badly
coupled logic...

cheers,
--renato


More information about the llvm-dev mailing list