1 # REQUIRES: amdgpu-registered-target
2 # RUN: llvm-reduce -abort-on-invalid-reduction -simplify-mir --delta-passes=instructions -mtriple=amdgcn-amd-amdhsa --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
3 # RUN: FileCheck --check-prefix=RESULT %s < %t
5 # CHECK-INTERESTINGNESS-LABEL: name: dead_def
6 # CHECK-INTERESTINGNESS: S_ENDPGM
8 # Make sure no IMPLICIT_DEF is introduced for dead operands.
10 # RESULT-NEXT: S_ENDPGM
14 tracksRegLiveness: true
18 dead %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
22 # CHECK-INTERESTINGNESS-LABEL: name: prev_def_rc_is_dead
23 # CHECK-INTERESTINGNESS: V_MOV_B32_e32
24 # CHECK-INTERESTINGNESS: V_MOV_B32_e32
25 # CHECK-INTERESTINGNESS: V_MOV_B32_e32
27 # RESULT: %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
28 # RESULT-NEXT: dead %1:vgpr_32 = V_MOV_B32_e32 %0, implicit $exec
29 # RESULT-NEXT: %2:vgpr_32 = V_MOV_B32_e32 %0, implicit $exec
31 name: prev_def_rc_is_dead
32 tracksRegLiveness: true
36 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
37 dead %1:vgpr_32 = V_MOV_B32_e32 %0, implicit $exec
38 %2:vgpr_32 = V_MOV_B32_e32 %0, implicit $exec
39 S_ENDPGM 0, implicit %2