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