This is an archive of the discontinued LLVM Phabricator instance.

[ARM][XO] Execute-only miscompiles double literals for big-endian
ClosedPublic

Authored by simonwallis2 on Jun 5 2020, 6:11 AM.

Details

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

Diff Detail

Event Timeline

simonwallis2 created this revision.Jun 5 2020, 6:11 AM
dmgreen accepted this revision.Jun 6 2020, 1:18 AM
dmgreen added a subscriber: dmgreen.

Yeah, I agree. Top bits should go into top bits. LGTM

This revision is now accepted and ready to land.Jun 6 2020, 1:18 AM
This revision was automatically updated to reflect the committed changes.