1# RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-fold-operands %s -o - | FileCheck -check-prefix=GCN %s
2
3# GCN-LABEL: name: test_part_fold{{$}}
4# GCN: %2:sreg_32 = S_ADD_I32 70, %1
5---
6name: test_part_fold
7tracksRegLiveness: true
8body: |
9  bb.0:
10    %0:sreg_32 = S_MOV_B32 70
11    %1:sreg_32 = S_MOV_B32 80
12    %2:sreg_32 = S_ADD_I32 %0, %1, implicit-def $scc
13...
14
15# GCN-LABEL: name: test_inline_const{{$}}
16# GCN: %2:sreg_32 = S_ADD_I32 70, 63
17---
18name: test_inline_const
19tracksRegLiveness: true
20body: |
21  bb.0:
22    %0:sreg_32 = S_MOV_B32 70
23    %1:sreg_32 = S_MOV_B32 63
24    %2:sreg_32 = S_ADD_I32 %0, %1, implicit-def $scc
25...
26# GCN-LABEL: name: test_obscure{{$}}
27# GCN: %2:sreg_32 = S_LSHL2_ADD_U32 70, %1
28---
29name: test_obscure
30tracksRegLiveness: true
31body: |
32  bb.0:
33    %0:sreg_32 = S_MOV_B32 70
34    %1:sreg_32 = S_MOV_B32 80
35    %2:sreg_32 = S_LSHL2_ADD_U32 %0, %1, implicit-def $scc
36...
37# GCN-LABEL: name: test_obscure_inline{{$}}
38# GCN: %2:sreg_32 = S_LSHL2_ADD_U32 70, 63
39---
40name: test_obscure_inline
41tracksRegLiveness: true
42body: |
43  bb.0:
44    %0:sreg_32 = S_MOV_B32 70
45    %1:sreg_32 = S_MOV_B32 63
46    %2:sreg_32 = S_LSHL2_ADD_U32 %0, %1, implicit-def $scc
47...
48# GCN-LABEL: name: test_frameindex{{$}}
49# GCN: %1:sreg_32 = S_ADD_I32 %stack.0, %0
50---
51name: test_frameindex
52tracksRegLiveness: true
53stack:
54  - { id: 0, type: default, offset: 0, size: 64, alignment: 16}
55body: |
56  bb.0:
57    %0:sreg_32 = S_MOV_B32 70
58    %1:sreg_32 = S_ADD_I32 %stack.0, %0, implicit-def $scc
59...
60# GCN-LABEL: name: test_frameindex_inline{{$}}
61# GCN: %1:sreg_32 = S_ADD_I32 %stack.0, 63
62---
63name: test_frameindex_inline
64tracksRegLiveness: true
65stack:
66  - { id: 0, type: default, offset: 0, size: 64, alignment: 16}
67body: |
68  bb.0:
69    %0:sreg_32 = S_MOV_B32 63
70    %1:sreg_32 = S_ADD_I32 %stack.0, %0, implicit-def $scc
71...
72