This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Generated SSAT and USAT instructions with shift
ClosedPublic

Authored by MeeraN on Aug 3 2020, 4:26 AM.

Details

Summary

Added patterns so that both SSAT and USAT instructions are generated with shifts. Added corresponding regression tests as well.

Diff Detail

Event Timeline

MeeraN created this revision.Aug 3 2020, 4:26 AM
MeeraN requested review of this revision.Aug 3 2020, 4:26 AM
dmgreen added inline comments.Aug 3 2020, 6:52 AM
llvm/lib/Target/ARM/ARMInstrThumb2.td
88

Any chance we can combine asr_imm_XFORM/asr_imm and t2_asr_imm_XFORM / t2_asr_imm to use the same SDNodeXForm? I think asr_imm should be visible in both these files.

llvm/test/CodeGen/Thumb2/thumb2-usat-with-shift.ll
2 ↗(On Diff #282578)

This can just be -mattr=+dsp I think. You could also just include this as a RUN line in the ARM/usat-with-shift.ll test if that's simpler. Up to you.

MeeraN updated this revision to Diff 282629.Aug 3 2020, 8:09 AM

Removed t2_asr_imm and replaced with just asr_imm. Also deleted thumb2 tests and instead included Run command in arm tests to avoid having the same tests repeated.

dmgreen accepted this revision.Aug 3 2020, 1:41 PM

LGTM. Thanks

This revision is now accepted and ready to land.Aug 3 2020, 1:41 PM
MeeraN closed this revision.Oct 1 2020, 8:28 AM
MeeraN marked an inline comment as done.