xref: /llvm-project/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu_function_alt.test (revision 34388f986af1289492d043b56b6cba17468d1f8d)
1## Checks two things:
2# - matching functions in AMDGPU assembly output without certain comments in the assembly
3# - using the --tool and --default-march arguments
4
5# Using `cat` as a tool requires some unusual setup (compared to the other test
6# of UpdateTestChecks tools), because update_llc_test_checks only reliably
7# substitutes %S (source directory) when evaluating RUN lines in the .ll file.
8# The .ll file used during the test is a temporary copy, so we also need to
9# provide a temporary copy of the cat'd .s file to avoid relying on
10# implementation details of how llvm-lit chooses %t.
11
12# RUN: rm -rf %t.dir && mkdir %t.dir
13# RUN: cp -f %S/Inputs/amdgpu_function_alt.s %t.dir/
14# RUN: cp -f %S/Inputs/amdgpu_function_alt.ll %t.dir/
15
16# RUN: %update_llc_test_checks --llc-binary "" --tool cat --default-march=amdgcn --version 4 %t.dir/amdgpu_function_alt.ll
17# RUN: diff -u %S/Inputs/amdgpu_function_alt.ll.expected %t.dir/amdgpu_function_alt.ll
18
19# Check that re-running remembers the arguments and doesn't change anything
20
21# RUN: %update_llc_test_checks --llc-binary "" %t.dir/amdgpu_function_alt.ll
22# RUN: diff -u %S/Inputs/amdgpu_function_alt.ll.expected %t.dir/amdgpu_function_alt.ll
23