Page MenuHomePhabricator

[AMDGPU] Add more tests for build_vector
ClosedPublic

Authored by jpages on Oct 12 2021, 9:13 AM.

Details

Summary

This patch adds and updates lit tests for build_vector.

Diff Detail

Event Timeline

jpages created this revision.Oct 12 2021, 9:13 AM
jpages requested review of this revision.Oct 12 2021, 9:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2021, 9:13 AM
foad accepted this revision.Oct 13 2021, 1:21 AM

Looks obviously fine once you have fixed the --check-prefixes problem. You could also auto-generate the checks for this file with update_llc_test_checks if you wanted to.

llvm/test/CodeGen/AMDGPU/build_vector.ll
1–5

You should just specify "ALL" on the command line, not "ALL-LABEL". FileCheck has a generic feature where you can put suffixes like "-LABEL" or "-DAG" on any prefix.

This revision is now accepted and ready to land.Oct 13 2021, 1:21 AM
jpages updated this revision to Diff 379370.Oct 13 2021, 7:21 AM

Rebased without -LABEL in --check-prefixes

jpages marked an inline comment as done.Oct 13 2021, 7:21 AM
foad added inline comments.Oct 13 2021, 7:23 AM
llvm/test/CodeGen/AMDGPU/build_vector.ll
4

Similarly this should be SI, not SI-DAG :)

jpages added inline comments.Oct 13 2021, 7:57 AM
llvm/test/CodeGen/AMDGPU/build_vector.ll
4

Unfortunately, the code is too different between the different architectures with GFX10....

I think I will update it with the script.

jpages updated this revision to Diff 379388.Oct 13 2021, 8:01 AM

Rebased: updated the test with the script instead of manually.

foad added inline comments.Oct 13 2021, 8:22 AM
llvm/test/CodeGen/AMDGPU/build_vector.ll
4

No, I mean that on the FileCheck command line you just specify "--check-prefixes=...,SI,...". It's fine to use "SI-DAG:" checks in the file.

jpages updated this revision to Diff 379497.Oct 13 2021, 12:41 PM

It was possible without the script, the diff is smaller like that, it's probably better.

jpages marked an inline comment as done.Oct 13 2021, 12:41 PM
foad accepted this revision.Oct 14 2021, 2:40 AM

LGTM, thanks!

This revision was automatically updated to reflect the committed changes.