1 # RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-fold-operands %s -o - | FileCheck -check-prefix=GCN %s
4 define amdgpu_ps void @omod_inst_flag_nsz_src() {
8 define amdgpu_ps void @omod_inst_flag_nsz_result() {
12 define amdgpu_ps void @omod_inst_flag_nsz_both() {
20 # FIXME: Is it OK to fold omod for this?
21 # GCN-LABEL: name: omod_inst_flag_nsz_src
22 # GCN: %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
23 # GCN-NEXT: %1:vgpr_32 = V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
24 # GCN-NEXT: S_ENDPGM implicit %1
25 name: omod_inst_flag_nsz_src
26 tracksRegLiveness: true
30 liveins: $vgpr0, $vgpr1
32 %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
33 %1:vgpr_32 = V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
39 # GCN-LABEL: name: omod_inst_flag_nsz_result
40 # GCN: %0:vgpr_32 = V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1, implicit $exec
41 # GCN-NEXT: S_ENDPGM implicit %0
43 name: omod_inst_flag_nsz_result
44 tracksRegLiveness: true
48 liveins: $vgpr0, $vgpr1
50 %0:vgpr_32 = V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
51 %1:vgpr_32 = nsz V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec
57 # GCN-LABEL: name: omod_inst_flag_nsz_both
58 # GCN: %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1, implicit $exec
59 # GCN-NEXT: S_ENDPGM implicit %0
61 name: omod_inst_flag_nsz_both
62 tracksRegLiveness: true
66 liveins: $vgpr0, $vgpr1
68 %0:vgpr_32 = nsz V_ADD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $exec
69 %1:vgpr_32 = nsz V_MUL_F32_e64 0, %0, 0, 1073741824, 0, 0, implicit $exec