Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 ; Assembly test for simple arithmetic operations. | 1 ; Assembly test for simple arithmetic operations. |
| 2 | 2 |
| 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 4 ; RUN: --target x8632 -i %s --args -O2 \ | 4 ; RUN: --target x8632 -i %s --args -O2 \ |
| 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
| 6 | 6 |
| 7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) | 7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) |
| 8 ; once enough infrastructure is in. Also, switch to --filetype=obj | 8 ; once enough infrastructure is in. Also, switch to --filetype=obj |
| 9 ; when possible. | 9 ; when possible. |
| 10 ; RUN: %if --need=target_ARM32 --need=allow_dump \ | 10 ; RUN: %if --need=target_ARM32 --need=allow_dump \ |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 ; | 200 ; |
| 201 ; ARM32-LABEL: Urem | 201 ; ARM32-LABEL: Urem |
| 202 ; ARM32: tst [[DENOM:r.*]], [[DENOM]] | 202 ; ARM32: tst [[DENOM:r.*]], [[DENOM]] |
| 203 ; ARM32: bne | 203 ; ARM32: bne |
| 204 ; ARM32: bl {{.*}} __umodsi3 | 204 ; ARM32: bl {{.*}} __umodsi3 |
| 205 ; ARM32HWDIV-LABEL: Urem | 205 ; ARM32HWDIV-LABEL: Urem |
| 206 ; ARM32HWDIV: tst | 206 ; ARM32HWDIV: tst |
| 207 ; ARM32HWDIV: bne | 207 ; ARM32HWDIV: bne |
| 208 ; ARM32HWDIV: udiv | 208 ; ARM32HWDIV: udiv |
| 209 ; ARM32HWDIV: mls | 209 ; ARM32HWDIV: mls |
| 210 | |
| 211 ; The following tests check that shift instructions don't try to use a | |
| 212 ; ConstantRelocatable as an immediate operand. | |
| 213 | |
| 214 @G = internal global [4 x i8] zeroinitializer, align 4 | |
| 215 | |
| 216 define i32 @ShlReloc(i32 %a) { | |
| 217 entry: | |
| 218 %opnd = ptrtoint [4 x i8]* @G to i32 | |
| 219 %result = shl i32 %a, %opnd | |
| 220 ret i32 %result | |
| 221 } | |
| 222 ; CHECK-LABEL: ShlReloc | |
| 223 ; CHECK: shl {{.*}},cl | |
|
jvoung (off chromium)
2015/08/04 21:21:51
Yeah I agree with the reloc awkwardness, especiall
| |
| 224 | |
| 225 define i32 @LshrReloc(i32 %a) { | |
| 226 entry: | |
| 227 %opnd = ptrtoint [4 x i8]* @G to i32 | |
| 228 %result = lshr i32 %a, %opnd | |
| 229 ret i32 %result | |
| 230 } | |
| 231 ; CHECK-LABEL: LshrReloc | |
| 232 ; CHECK: shr {{.*}},cl | |
| 233 | |
| 234 define i32 @AshrReloc(i32 %a) { | |
| 235 entry: | |
| 236 %opnd = ptrtoint [4 x i8]* @G to i32 | |
| 237 %result = ashr i32 %a, %opnd | |
| 238 ret i32 %result | |
| 239 } | |
| 240 ; CHECK-LABEL: AshrReloc | |
| 241 ; CHECK: sar {{.*}},cl | |
| OLD | NEW |