This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Add patterns for shift intrinsics with FalseLanesZero mode
ClosedPublic

Authored by lizhijin on Mar 8 2023, 12:12 AM.

Details

Summary

This patch adds patterns to reduce redundant mov and sel instructions
for shift intrinsics with FalseLanesZero mode, when
FeatureExperimentalZeroingPseudosis supported.

For example, before:

mov     z1.b, #0
sel     z0.b, p0, z0.b, z1.b
asr     z0.b, p0/m, z0.b, #7

After:

movprfx z0.b, p0/z, z0.b
asr     z0.b, p0/m, z0.b, #7

Diff Detail

Event Timeline

lizhijin created this revision.Mar 8 2023, 12:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 12:12 AM
lizhijin requested review of this revision.Mar 8 2023, 12:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 12:12 AM
lizhijin edited the summary of this revision. (Show Details)Mar 8 2023, 12:16 AM
Matt added a subscriber: Matt.Mar 8 2023, 10:54 AM
paulwalker-arm added inline comments.Mar 9 2023, 5:55 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
5882

These operand types (plus the tvecshiftL ones above) are specific to left shifts. You might want to take inspiration from sve_int_shift_pred_bhsd.

lizhijin updated this revision to Diff 504398.Mar 11 2023, 6:32 PM
lizhijin marked an inline comment as done.Mar 13 2023, 6:17 PM

ping

llvm/lib/Target/AArch64/SVEInstrFormats.td
5882

Updated. Thanks!

paulwalker-arm accepted this revision.Mar 16 2023, 3:44 AM
This revision is now accepted and ready to land.Mar 16 2023, 3:44 AM
This revision was automatically updated to reflect the committed changes.
omjavaid reopened this revision.Mar 20 2023, 12:41 AM
omjavaid added a subscriber: omjavaid.

This change has broken LLVM SVE buildbot https://lab.llvm.org/buildbot/#/builders/197/builds/4272
I have reverted the change for now.

This revision is now accepted and ready to land.Mar 20 2023, 12:41 AM
omjavaid closed this revision.Mar 20 2023, 3:35 AM

Sorry for inconvenience.
I have reverted the revert of this patch as it turned out buildbot breakage was cause by some other commit.