Another 32 to 64 bit sign extension bug.
[oota-llvm.git] / test / MC / Mips / higher_highest.ll
1 ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64  -force-mips-long-branch -filetype=obj < %s -o - | elf-dump --dump-section-data | FileCheck %s
2
3 ; Check that the R_MIPS_HIGHER and R_MIPS_HIGHEST relocations were created.
4
5 ; CHECK:     ('r_type', 0x1d)
6 ; CHECK:     ('r_type', 0x1d)
7 ; CHECK:     ('r_type', 0x1c)
8 ; CHECK:     ('r_type', 0x1c)
9
10 @g0 = external global i32
11
12 define void @foo1(i32 %s) nounwind {
13 entry:
14
15   %tobool = icmp eq i32 %s, 0
16   br i1 %tobool, label %if.end, label %if.then
17
18 if.then:                                          ; preds = %entry
19   %0 = load i32* @g0, align 4
20   %add = add nsw i32 %0, 12
21   store i32 %add, i32* @g0, align 4
22   br label %if.end
23
24 if.end:                                           ; preds = %entry, %if.then
25   ret void
26 }
27