[mips] Set instruction itineraries of loads, stores and conditional moves.
[oota-llvm.git] / test / MC / Mips / xgot.ll
1 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | llvm-readobj -r | FileCheck %s
2
3 @.str = private unnamed_addr constant [16 x i8] c"ext_1=%d, i=%d\0A\00", align 1
4 @ext_1 = external global i32
5
6 define void @fill() nounwind {
7 entry:
8
9 ; Check that the appropriate relocations were created. 
10 ; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
11
12 ; CHECK: Relocations [
13 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_HI16
14 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_LO16
15 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_HI16
16 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_LO16
17 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_HI16
18 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
19 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT
20 ; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_LO16
21 ; CHECK: ]
22
23   %0 = load i32* @ext_1, align 4
24   %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind
25   ret void
26 }
27
28 declare i32 @printf(i8* nocapture, ...) nounwind
29