This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Select @llvm.aarch64.ldaxr.* intrinsics
ClosedPublic

Authored by paquette on Aug 28 2019, 10:52 AM.

Details

Summary

Add a GISelPredicateCode to ldaxr_*. This allows us to import the patterns for @llvm.aarch64.ldaxr.*, and thus select them.

Add isLoadStoreOfNumBytes for the GISelPredicateCode, since each of these intrinsics involves the same check.

Add select-ldaxr-intrin.mir, and update arm64-ldxr-stxr.ll.

Diff Detail

Repository
rL LLVM

Event Timeline

paquette created this revision.Aug 28 2019, 10:52 AM
aemerson accepted this revision.Aug 28 2019, 1:32 PM

The new test can be made more concise, but it's also a bit redundant given we're adding checks to an existing one. I don't mind either way.

llvm/test/CodeGen/AArch64/GlobalISel/select-ldaxr-intrin.mir
32 ↗(On Diff #217689)

Just use a pointer parameter here instead of a global?

37 ↗(On Diff #217689)

And return the value here to reduce the test size.

This revision is now accepted and ready to land.Aug 28 2019, 1:32 PM
paquette updated this revision to Diff 217723.Aug 28 2019, 1:46 PM

Simplify MIR test before committing

This revision was automatically updated to reflect the committed changes.