| OLD | NEW |
| 1 ; This tries to be a comprehensive test of i64 operations, in | 1 ; This tries to be a comprehensive test of i64 operations, in |
| 2 ; particular the patterns for lowering i64 operations into constituent | 2 ; particular the patterns for lowering i64 operations into constituent |
| 3 ; i32 operations on x86-32. | 3 ; i32 operations on x86-32. |
| 4 | 4 |
| 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ | 6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ |
| 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
| 8 | 8 |
| 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ | 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ |
| 11 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=OPTM1 %s | 11 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=OPTM1 %s |
| 12 | 12 |
| 13 ; RUN: %if --need=target_ARM32 \ | 13 ; RUN: %if --need=target_ARM32 \ |
| 14 ; RUN: --command %p2i --filetype=obj \ | 14 ; RUN: --command %p2i --filetype=obj \ |
| 15 ; RUN: --disassemble --target arm32 -i %s --args -O2 \ | 15 ; RUN: --disassemble --target arm32 -i %s --args -O2 \ |
| 16 ; RUN: -allow-externally-defined-symbols \ | 16 ; RUN: -allow-externally-defined-symbols \ |
| 17 ; RUN: | %if --need=target_ARM32 \ | 17 ; RUN: | %if --need=target_ARM32 \ |
| 18 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-O2 %s | 18 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-O2 %s |
| 19 ; RUN: %if --need=target_ARM32 \ | 19 ; RUN: %if --need=target_ARM32 \ |
| 20 ; RUN: --command %p2i --filetype=obj --disassemble --target arm32 \ | 20 ; RUN: --command %p2i --filetype=obj --disassemble --target arm32 \ |
| 21 ; RUN: -i %s --args -Om1 \ | 21 ; RUN: -i %s --args -Om1 \ |
| 22 ; RUN: -allow-externally-defined-symbols \ | 22 ; RUN: -allow-externally-defined-symbols \ |
| 23 ; RUN: | %if --need=target_ARM32 \ | 23 ; RUN: | %if --need=target_ARM32 \ |
| 24 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-OM1 %s | 24 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-OM1 %s |
| 25 | 25 |
| 26 ; TODO(rkotler): Stop skipping unimplemented parts (via --skip-unimplemented) | 26 ; TODO: Switch to --filetype=obj when possible. |
| 27 ; once enough infrastructure is in. Also, switch to --filetype=obj | |
| 28 ; when possible. | |
| 29 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ | 27 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ |
| 30 ; RUN: --command %p2i --filetype=asm --assemble \ | 28 ; RUN: --command %p2i --filetype=asm --assemble \ |
| 31 ; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \ | 29 ; RUN: --disassemble --target mips32 -i %s --args -O2 \ |
| 32 ; RUN: -allow-externally-defined-symbols \ | 30 ; RUN: -allow-externally-defined-symbols \ |
| 33 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ | 31 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ |
| 34 ; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix MIPS32-O2 %s | 32 ; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix MIPS32-O2 %s |
| 35 | 33 |
| 36 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ | 34 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ |
| 37 ; RUN: --command %p2i --filetype=asm --assemble \ | 35 ; RUN: --command %p2i --filetype=asm --assemble \ |
| 38 ; RUN: --disassemble --target mips32 -i %s --args -Om1 --skip-unimplemented \ | 36 ; RUN: --disassemble --target mips32 -i %s --args -Om1 \ |
| 39 ; RUN: -allow-externally-defined-symbols \ | 37 ; RUN: -allow-externally-defined-symbols \ |
| 40 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ | 38 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ |
| 41 ; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix MIPS32-OM1 %s | 39 ; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix MIPS32-OM1 %s |
| 42 | 40 |
| 43 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 41 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| 44 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 42 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| 45 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 | 43 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
| 46 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 | 44 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 |
| 47 | 45 |
| 48 define internal i32 @ignore64BitArg(i64 %a, i32 %b, i64 %c) { | 46 define internal i32 @ignore64BitArg(i64 %a, i32 %b, i64 %c) { |
| (...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 %s = lshr i64 %a, 40 | 2461 %s = lshr i64 %a, 40 |
| 2464 %t = trunc i64 %s to i32 | 2462 %t = trunc i64 %s to i32 |
| 2465 %r = sub i32 %t, 1 | 2463 %r = sub i32 %t, 1 |
| 2466 ret i32 %r | 2464 ret i32 %r |
| 2467 ; ARM32-LABEL: subOneToUpperAfterShift | 2465 ; ARM32-LABEL: subOneToUpperAfterShift |
| 2468 ; ARM32: subs | 2466 ; ARM32: subs |
| 2469 ; ARM32: sbc | 2467 ; ARM32: sbc |
| 2470 ; ARM32: lsr | 2468 ; ARM32: lsr |
| 2471 ; ARM32: sub | 2469 ; ARM32: sub |
| 2472 } | 2470 } |
| OLD | NEW |