This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][AArch64] Fix compile with LLVM trunk.
ClosedPublic

Authored by efriedma on May 9 2019, 5:04 PM.

Details

Summary

The code is currently using the ambiguous instruction "sub sp, sp, w9, lsl #4". The ARM instruction manual says this isn't valid, and it's not clear whether it's supposed to mean uxtw or uxtx. LLVM used to accept this and treat it as uxtx, but now it rejects the construct.

It doesn't matter which form of extension we use here, since the high bits of the operand are zero anyway, so I arbitrarily choose uxtw, to preserve the register name.

See https://reviews.llvm.org/D60840 for the LLVM patch.

This is my first patch to the OpenMP runtime; not sure if I'm selecting appropriate reviewers.

Diff Detail

Event Timeline

efriedma created this revision.May 9 2019, 5:04 PM
jdoerfert accepted this revision.May 14 2019, 2:22 PM

I'd say as an ARM expert, and a person that knows what we used to do for this ill-formed input, you are perfectly qualified to fix this.

This revision is now accepted and ready to land.May 14 2019, 2:22 PM
fhahn accepted this revision.May 14 2019, 2:31 PM
fhahn added a subscriber: fhahn.

The change in the AArch64 assembly looks good to me.

This revision was automatically updated to reflect the committed changes.

Please subscribe to openmp-commits for future patches to the OpenMP runtime such that your revisions from Phabricator and more importantly commit emails get through.

Sorry, I didn't realize that's how the moderation works; subscribed now.

Sorry, I didn't realize that's how the moderation works; subscribed now.

No worries, they'll get through eventually as they did for this patch, but that might take some time.