1 # RUN: llc -mtriple=ve -verify-machineinstrs -run-pass peephole-opt -o - %s | FileCheck %s
4 ## Ensure fold immediate as simm7 at rhs
5 #CHECK-LABEL: name: addsl_ri
6 #CHECK: %2:i64 = nsw ADDSLri %0, 5
9 exposesReturnsTwice: false
11 regBankSelected: false
14 tracksRegLiveness: true
17 - { id: 0, class: i64, preferred-register: '' }
18 - { id: 1, class: i64, preferred-register: '' }
20 - { reg: '$sx0', virtual-reg: '%0' }
22 isFrameAddressTaken: false
23 isReturnAddressTaken: false
32 maxCallFrameSize: 4294967295
33 cvBytesOfCalleeSavedRegisters: 0
34 hasOpaqueSPAdjustment: false
36 hasMustTailInVarArgFunc: false
43 debugValueSubstitutions: []
45 machineFunctionInfo: {}
52 %2:i64 = nsw ADDSLrr %0, %1
54 RET implicit $sx10, implicit $sx0
59 ## Ensure fold immediate as mimm at rhs
60 #CHECK-LABEL: name: addsl_rm
61 #CHECK: %2:i64 = nsw ADDSLrm %0, 120
64 exposesReturnsTwice: false
66 regBankSelected: false
69 tracksRegLiveness: true
72 - { id: 0, class: i64, preferred-register: '' }
73 - { id: 1, class: i64, preferred-register: '' }
75 - { reg: '$sx0', virtual-reg: '%0' }
77 isFrameAddressTaken: false
78 isReturnAddressTaken: false
87 maxCallFrameSize: 4294967295
88 cvBytesOfCalleeSavedRegisters: 0
89 hasOpaqueSPAdjustment: false
91 hasMustTailInVarArgFunc: false
98 debugValueSubstitutions: []
100 machineFunctionInfo: {}
107 %2:i64 = nsw ADDSLrr %0, %1
109 RET implicit $sx10, implicit $sx0
114 ## Ensure fold immediate as simm7 at lhs
115 #CHECK-LABEL: name: addsl_ri_com
116 #CHECK: %2:i64 = nsw ADDSLri %0, 5
119 exposesReturnsTwice: false
121 regBankSelected: false
124 tracksRegLiveness: true
127 - { id: 0, class: i64, preferred-register: '' }
128 - { id: 1, class: i64, preferred-register: '' }
130 - { reg: '$sx0', virtual-reg: '%0' }
132 isFrameAddressTaken: false
133 isReturnAddressTaken: false
142 maxCallFrameSize: 4294967295
143 cvBytesOfCalleeSavedRegisters: 0
144 hasOpaqueSPAdjustment: false
146 hasMustTailInVarArgFunc: false
153 debugValueSubstitutions: []
155 machineFunctionInfo: {}
162 %2:i64 = nsw ADDSLrr %1, %0
164 RET implicit $sx10, implicit $sx0
169 ## Ensure fold immediate as mimm at rhs
170 #CHECK-LABEL: name: addsl_rm_com
171 #CHECK: %2:i64 = nsw ADDSLrm %0, 120
174 exposesReturnsTwice: false
176 regBankSelected: false
179 tracksRegLiveness: true
182 - { id: 0, class: i64, preferred-register: '' }
183 - { id: 1, class: i64, preferred-register: '' }
185 - { reg: '$sx0', virtual-reg: '%0' }
187 isFrameAddressTaken: false
188 isReturnAddressTaken: false
197 maxCallFrameSize: 4294967295
198 cvBytesOfCalleeSavedRegisters: 0
199 hasOpaqueSPAdjustment: false
201 hasMustTailInVarArgFunc: false
208 debugValueSubstitutions: []
210 machineFunctionInfo: {}
217 %2:i64 = nsw ADDSLrr %1, %0
219 RET implicit $sx10, implicit $sx0