This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix a bug in finding a pair of extracts to create VMOVRRD
ClosedPublic

Authored by pzheng on Oct 5 2021, 3:23 PM.

Details

Summary

D100244 missed a check on the ResNo of the extract's operand 0 when finding a
pair of extracts to combine into a VMOVRRD (extract(x, n); extract(x, n+1) ->
VMOVRRD(extract x, n/2)). As a result, it can incorrectly pair an extract(x, n)
with another extract(x:3, n+1) for example. This patch fixes the bug by adding
the proper check on ResNo.

Diff Detail

Event Timeline

pzheng created this revision.Oct 5 2021, 3:23 PM
pzheng requested review of this revision.Oct 5 2021, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 3:23 PM
dmgreen accepted this revision.Oct 6 2021, 12:01 AM

Oh yeah. That makes sense. LGTM

llvm/test/CodeGen/ARM/vector-extract.ll
2

Can you run update_test_checks on this file, to show the entire assembly output.
It may be better to use a less old triple too. Maybe armv7a-none-eabi.

This revision is now accepted and ready to land.Oct 6 2021, 12:01 AM
pzheng updated this revision to Diff 377562.Oct 6 2021, 8:50 AM

Address @dmgreen's comments

pzheng marked an inline comment as done.Oct 6 2021, 8:52 AM
pzheng added inline comments.
llvm/test/CodeGen/ARM/vector-extract.ll
2

Thanks for the comment. I have updated the test in the latest revision.

This revision was automatically updated to reflect the committed changes.
pzheng marked an inline comment as done.