Page MenuHomePhabricator

[ARM] Fix so immediates and pc relative checks
AcceptedPublic

Authored by dnsampaio on Thu, Jul 30, 2:18 AM.

Details

Summary

ARM Constant Islands would not consider that
pc relative instructions should use offsets
of 8 in ARM and 4 in thumb mode, so the tested
values did not match the values in the code.

Also it would not detect values that could
could not be represented by SO immediates,
breaking only durin the emission of object
files.

Diff Detail

Event Timeline

dnsampaio created this revision.Thu, Jul 30, 2:18 AM
dnsampaio requested review of this revision.Thu, Jul 30, 2:18 AM
This revision is now accepted and ready to land.Thu, Jul 30, 6:36 AM
dmgreen added inline comments.Thu, Jul 30, 6:47 AM
llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
326 ↗(On Diff #281843)

I've not looked into any of the details yet, but what's happening with these changes? I wouldn't expect any of them to be hitting the limit on a adr.

dmgreen added inline comments.Thu, Jul 30, 6:49 AM
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
1792–1793

I guess, should this be true?

dnsampaio marked 2 inline comments as done.Thu, Jul 30, 8:40 AM
dnsampaio added inline comments.
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
1792–1793

Indeed, we are testing t1 coding here.

llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
326 ↗(On Diff #281843)

Were consequence of not performing the reduction, due the error below.

dnsampaio updated this revision to Diff 281945.Thu, Jul 30, 8:41 AM
dnsampaio marked 2 inline comments as done.

Fixed true -> false for isSOImm when checking for reducing to t1 instructions