1 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-fold-operands %s -o - | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: test_part_fold{{$}}
4 # GCN: %2:sreg_32 = S_ADD_I32 70, %1
7 tracksRegLiveness: true
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
15 # GCN-LABEL: name: test_inline_const{{$}}
16 # GCN: %2:sreg_32 = S_ADD_I32 70, 63
18 name: test_inline_const
19 tracksRegLiveness: true
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
26 # GCN-LABEL: name: test_obscure{{$}}
27 # GCN: %2:sreg_32 = S_LSHL2_ADD_U32 70, %1
30 tracksRegLiveness: true
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
37 # GCN-LABEL: name: test_obscure_inline{{$}}
38 # GCN: %2:sreg_32 = S_LSHL2_ADD_U32 70, 63
40 name: test_obscure_inline
41 tracksRegLiveness: true
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
48 # GCN-LABEL: name: test_frameindex{{$}}
49 # GCN: %1:sreg_32 = S_ADD_I32 %stack.0, %0
52 tracksRegLiveness: true
54 - { id: 0, type: default, offset: 0, size: 64, alignment: 16}
57 %0:sreg_32 = S_MOV_B32 70
58 %1:sreg_32 = S_ADD_I32 %stack.0, %0, implicit-def $scc
60 # GCN-LABEL: name: test_frameindex_inline{{$}}
61 # GCN: %1:sreg_32 = S_ADD_I32 %stack.0, 63
63 name: test_frameindex_inline
64 tracksRegLiveness: true
66 - { id: 0, type: default, offset: 0, size: 64, alignment: 16}
69 %0:sreg_32 = S_MOV_B32 63
70 %1:sreg_32 = S_ADD_I32 %stack.0, %0, implicit-def $scc