[ARM][XO] Execute-only miscompiles double literals for big-endian
authorSimon Wallis <simon.wallis2@arm.com>
Mon, 8 Jun 2020 07:10:42 +0000 (08:10 +0100)
committerSimon Wallis <simon.wallis2@arm.com>
Mon, 8 Jun 2020 07:13:08 +0000 (08:13 +0100)
commit7432fb2c784691eb85b5996e0922b55389b43b6e
treecedaa9c9db07271c69c5002952cf6b43f9fa8e42
parent2aa483016de0a8b3d61d15f4973293cccd65c378
[ARM][XO] Execute-only miscompiles double literals for big-endian

Summary:
With -mbig-endian -mexecute-only and targeting an fpu,
an incorrect sequence of movw/movt was generated to construct a double literal.
The test suite was hardwired to check these wrong values.

The fault was caused by the explicit word swap in LowerConstantFP().

With -mbig-endian -mexecute-only -mfpu=none, a correct sequence of
movw/movt is generated to construct a double literal.
The test suite did not test this no fpu case.

The test suite expected values have been corrected.
The test file is updated to add testing of fpu=none case

Reviewers: christof, llvm-commits, dmgreen

Reviewed By: dmgreen

Subscribers: dmgreen, kristof.beyls, hiraditya, danielkiss

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81259

Change-Id: Ia3737df243218c89c82f02b7f9f4032ecd5a3917
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/constantfp.ll