1# REQUIRES: x86-registered-target
2## Basic test checking that update_llc_test_checks.py can update a file with multiple check prefixes
3
4# RUN: cp -f %S/Inputs/basic.ll %t.ll && %update_llc_test_checks %t.ll
5# RUN: echo '; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py' > %t.expected.ll
6# RUN: cat %S/Inputs/basic.ll.expected >> %t.expected.ll
7# RUN: diff -u %t.expected.ll %t.ll
8
9## The flags --x86_scrub_rip and --extra_scrub should not have any effect on this
10## test. Check the output is identical.
11# RUN: cp -f %S/Inputs/basic.ll %t.ll && %update_llc_test_checks --extra_scrub %t.ll
12# RUN: echo '; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --extra_scrub' > %t.expected.ll
13# RUN: cat %S/Inputs/basic.ll.expected >> %t.expected.ll
14# RUN: diff -u %t.expected.ll %t.ll
15# RUN: cp -f %S/Inputs/basic.ll %t.ll && %update_llc_test_checks --no_x86_scrub_rip %t.ll
16# RUN: echo '; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_rip' > %t.expected.ll
17# RUN: cat %S/Inputs/basic.ll.expected >> %t.expected.ll
18# RUN: diff -u %t.expected.ll %t.ll
19
20## Finally, run the script on an already updated file and verify that all previous
21## CHECK lines are removed.
22# RUN: %update_llc_test_checks %t.ll
23# RUN: echo '; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_rip' > %t.expected.ll
24# RUN: cat %S/Inputs/basic.ll.expected >> %t.expected.ll
25# RUN: diff -u %t.expected.ll %t.ll
26