This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE][InstCombine] Canonicalize aarch64_sve_dup_x intrinsic to IR splat operation
ClosedPublic

Authored by mnadeem on Sep 1 2021, 6:17 PM.

Diff Detail

Event Timeline

mnadeem created this revision.Sep 1 2021, 6:17 PM
mnadeem requested review of this revision.Sep 1 2021, 6:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 6:17 PM

The patch looks good but please add an explicit test for the dup_x->splat transform to sve-intrinsic-opts-dup.ll.

The above failures are because many of the SVE ACLE tests use dup_x so unfortunately those will need updating as well. I guess this is the trade off, the SVE ACLE tests use -O1 so that they can ignore local variable stack access but then it means updates are required when we canonicalising the intrinsics to LLVM constants/instructions. Another option is to perhaps disable instcombine for those tests but I've not looked to see if that is possible, but my gut feeling is probably not.

Matt added a subscriber: Matt.Sep 2 2021, 7:05 AM
mnadeem updated this revision to Diff 370463.Sep 2 2021, 6:36 PM

Updated acle tests and added an explicit test.

paulwalker-arm accepted this revision.Sep 3 2021, 2:55 AM
This revision is now accepted and ready to land.Sep 3 2021, 2:55 AM
This revision was landed with ongoing or failed builds.Sep 10 2021, 12:53 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2021, 12:53 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript