This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix scalar imm variants of SIMD shift left instructions
ClosedPublic

Authored by asavonic on Apr 29 2021, 3:00 PM.

Details

Summary

This issue was reported in PR50057: Cannot select:
t10: i64 = AArch64ISD::VSHL t2, Constant:i32<2>

Shift intrinsics (llvm.aarch64.neon.ushl.i64 and sshl) with a constant
shift operand are lowered into AArch64ISD::VSHL in tryCombineShiftImm.
VSHL has i64 and v1i64 patterns for a right shift, but only v1i64 for
a left shift.

This patch adds the missing i64 pattern for AArch64ISD::VSHL, and LIT
tests to cover scalar variants (i64 and v1i64) of all shift
intrinsics (only ushl and sshl cases fail without the patch, others
were just not covered).

Diff Detail

Event Timeline

asavonic created this revision.Apr 29 2021, 3:00 PM
asavonic requested review of this revision.Apr 29 2021, 3:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2021, 3:00 PM
dmgreen accepted this revision.May 2 2021, 7:15 AM

Sounds good to me. Thanks.

This revision is now accepted and ready to land.May 2 2021, 7:15 AM
This revision was landed with ongoing or failed builds.May 5 2021, 6:29 AM
This revision was automatically updated to reflect the committed changes.