OLD | NEW |
1 ; TODO: Switch to --filetype=obj when possible. | 1 ; TODO: Switch to --filetype=obj when possible. |
2 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ | 2 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ |
3 ; RUN: --command %p2i --filetype=asm --assemble \ | 3 ; RUN: --command %p2i --filetype=asm --assemble \ |
4 ; RUN: --disassemble --target mips32 -i %s --args -O2 \ | 4 ; RUN: --disassemble --target mips32 -i %s --args -O2 \ |
5 ; RUN: -allow-externally-defined-symbols \ | 5 ; RUN: -allow-externally-defined-symbols \ |
6 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ | 6 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ |
7 ; RUN: --command FileCheck --check-prefix MIPS32 %s | 7 ; RUN: --command FileCheck --check-prefix MIPS32 %s |
8 | 8 |
9 define internal void @uncond1(i32 %i) { | 9 define internal void @uncond1(i32 %i) { |
10 %1 = alloca i8, i32 4, align 4 | 10 %1 = alloca i8, i32 4, align 4 |
11 %.bc = bitcast i8* %1 to i32* | 11 %.bc = bitcast i8* %1 to i32* |
12 store i32 %i, i32* %.bc, align 1 | 12 store i32 %i, i32* %.bc, align 1 |
13 br label %target | 13 br label %target |
14 target: | 14 target: |
15 %.bc1 = bitcast i8* %1 to i32* | 15 %.bc1 = bitcast i8* %1 to i32* |
16 %2 = load i32, i32* %.bc1, align 1 | 16 %2 = load i32, i32* %.bc1, align 1 |
17 %3 = add i32 %2, 1 | 17 %3 = add i32 %2, 1 |
18 %.bc2 = bitcast i8* %1 to i32* | 18 %.bc2 = bitcast i8* %1 to i32* |
19 store i32 %3, i32* %.bc2, align 1 | 19 store i32 %3, i32* %.bc2, align 1 |
20 br label %target | 20 br label %target |
21 } | 21 } |
22 | 22 |
23 ; MIPS32-LABEL: uncond1 | 23 ; MIPS32-LABEL: uncond1 |
24 ; MIPS32: <.Luncond1$target>: | 24 ; MIPS32: <.Luncond1$target>: |
25 ; MIPS32: li | 25 ; MIPS32: addiu {{.*}},1 |
26 ; MIPS32: addu | |
27 ; MIPS32: b {{[0-9a-f]+}} <.Luncond1$target> | 26 ; MIPS32: b {{[0-9a-f]+}} <.Luncond1$target> |
OLD | NEW |