[AMDGPU] Add implicit negative check for the set_gpr_idx tests
authorJay Foad <jay.foad@amd.com>
Fri, 30 Apr 2021 13:17:14 +0000 (14:17 +0100)
committerJay Foad <jay.foad@amd.com>
Fri, 30 Apr 2021 13:45:12 +0000 (14:45 +0100)
The only effect of the optimization is to remove s_set_gpr_idx_*
instructions, and update_mir_test_checks.py always inserts CHECK: rather
than CHECK-NEXT: checks, so without this implicit negative check, the
tests would always pass even if the optimization did nothing.

Differential Revision: https://reviews.llvm.org/D101622

llvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir

index 765148a..6ba12e5 100644 (file)
@@ -1,5 +1,5 @@
 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
-# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass si-pre-emit-peephole -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
+# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass si-pre-emit-peephole -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s -implicit-check-not=S_SET_GPR_IDX
 
 ---
 name:            simple