This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][NFC] Precommit test case to show sub-optimal codegen for add(lsl(val1,small-shift), lsl(val2,large-shift)).
ClosedPublic

Authored by mingmingl on Oct 4 2022, 1:59 PM.

Details

Reviewers
dmgreen
Summary

Ideally, add operand with smaller shift should be RHS. In that way, smaller-shift is folded into ADD.

  • Also add another test case when 'lsl(val1,small-shift)' has one than one use, to show the (planned) optimization won't regress this case.

Diff Detail

Event Timeline

mingmingl created this revision.Oct 4 2022, 1:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 1:59 PM
mingmingl requested review of this revision.Oct 4 2022, 1:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 1:59 PM
mingmingl updated this revision to Diff 465157.Oct 4 2022, 2:09 PM

add another test case that shouldn't be regressed by the planned optimization.

mingmingl updated this revision to Diff 465166.Oct 4 2022, 2:35 PM
mingmingl edited the summary of this revision. (Show Details)

Add test case for i32 (besides existing i64).

mingmingl updated this revision to Diff 465171.Oct 4 2022, 2:53 PM

Run 'update_llc_test.py' to update check statements.

dmgreen accepted this revision.Oct 9 2022, 2:08 AM
dmgreen added a subscriber: dmgreen.

Tests sound good. LGTM.

This revision is now accepted and ready to land.Oct 9 2022, 2:08 AM