Page MenuHomePhabricator

[GlobalISel][AArch64] Add naive selection for @llvm.aarch64.ldaxr
AbandonedPublic

Authored by paquette on Jul 29 2019, 3:38 PM.

Details

Reviewers
aemerson
Summary

This adds naive instruction selection for the @llvm.aarch64.ldaxr intrinsic.

This will select the right instruction based off the number of bytes being loaded, but it doesn't try to do any folding etc. This isn't great for code size, but at least prevents us from falling back on this intrinsic.

(Since the instructions we're not folding have already been selected by the time we run into the intrinsic, it's difficult to do this the "right" way during selection.)

Add a test for the intrinsic (select-ldaxr-intrin.mir) and update arm64-ldxr-stxr.ll as well.

Diff Detail

Event Timeline

paquette created this revision.Jul 29 2019, 3:38 PM

I'd prefer to do this by extending the emitter. After D65756 lands, we should be able to get the 64-bit load intrinsics this way.

However, we won't be able to get the smaller ones, since their patterns use SUBREG_TO_REG. The emitter doesn't know how to support that yet.

paquette abandoned this revision.Wed, Aug 28, 10:54 AM

Abandoning this because D66897 does it in a much better way. Once we import SUBREG_TO_REG (D66769), we can just import all of these.