This is an archive of the discontinued LLVM Phabricator instance.

[Thumb] Emit Thumb move in both Thumb modes for struct_byval predicates
ClosedPublic

Authored by prakhar on Jul 27 2016, 7:10 AM.

Details

Summary

The MOV/MOVT instructions being chosen for struct_byval predicates was
conditional only on Thumb2, resulting in an ARM MOV/MOVT instruction
being incorrectly emitted in Thumb1 mode. This is especially apparent
with v8-m.base targets. This patch ensures that Thumb instructions are
emitted in both Thumb modes.

Diff Detail

Event Timeline

prakhar updated this revision to Diff 65736.Jul 27 2016, 7:10 AM
prakhar retitled this revision from to [Thumb] Emit Thumb move in both Thumb modes for struct_byval predicates.
prakhar updated this object.
t.p.northover edited edge metadata.Jul 27 2016, 7:32 AM
t.p.northover added a subscriber: llvm-commits.

Added llvm-commits.

t.p.northover accepted this revision.Jul 28 2016, 7:12 AM
t.p.northover edited edge metadata.

Looks good with a couple of cleanups to the function now that IsThumb exists.

lib/Target/ARM/ARMISelLowering.cpp
7929

Just as well make this IsThumb now.

8031

Also better as isThumb?

This revision is now accepted and ready to land.Jul 28 2016, 7:12 AM
prakhar marked 2 inline comments as done.Jul 28 2016, 7:40 AM

I'll clean up the other uses of IsThumb1/IsThumb2 while I'm at it.

prakhar updated this revision to Diff 65933.Jul 28 2016, 7:41 AM
prakhar edited edge metadata.

Clean up other uses of IsThumb1 and IsThumb2

Thanks. Looks fine now.

This revision was automatically updated to reflect the committed changes.