[DAGCombiner] Eliminate dead stores to stack.
[llvm-complete.git] / test / CodeGen / AMDGPU / omod-nsz-flag.mir
blob861cdda8ad6f781418b264629156c8fa3b251aac
1 # RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-fold-operands  %s -o - | FileCheck -check-prefix=GCN %s
3 --- |
4   define amdgpu_ps void @omod_inst_flag_nsz_src() {
5     unreachable
6   }
8   define amdgpu_ps void @omod_inst_flag_nsz_result() {
9     unreachable
10   }
12   define amdgpu_ps void @omod_inst_flag_nsz_both() {
13     unreachable
14   }
16 ...
18 ---
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
28 body:             |
29   bb.0:
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
34   S_ENDPGM implicit %1
36 ...
37 ---
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
46 body:             |
47   bb.0:
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
52   S_ENDPGM implicit %1
53 ...
55 ---
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
64 body:             |
65   bb.0:
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
70   S_ENDPGM implicit %1
71 ...