summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:57 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:57 +0000
commitf3cf04f900cb7df19106c642d4c8f82b32b185a9 (patch)
treee0d994c0c6aa849716d38b19c6c22fce10d46fa5
parentbea241a5f5dd3a6f17bf0c968c4a71c5776fbd2a (diff)
downloadbcm5719-llvm-f3cf04f900cb7df19106c642d4c8f82b32b185a9.tar.gz
bcm5719-llvm-f3cf04f900cb7df19106c642d4c8f82b32b185a9.zip
Testcase for recent ro/relocs stuff
llvm-svn: 68008
-rw-r--r--llvm/test/CodeGen/X86/rodata-relocs.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/rodata-relocs.ll b/llvm/test/CodeGen/X86/rodata-relocs.ll
new file mode 100644
index 00000000000..fc10759fb8d
--- /dev/null
+++ b/llvm/test/CodeGen/X86/rodata-relocs.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -relocation-model=static | grep rodata | count 3
+; RUN: llvm-as < %s | llc -relocation-model=static | grep -F "rodata.cst" | count 2
+; RUN: llvm-as < %s | llc -relocation-model=pic | grep rodata | count 2
+; RUN: llvm-as < %s | llc -relocation-model=pic | grep -F ".data" | count 1
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+@a = internal constant [2 x i32] [i32 1, i32 2] ; <[2 x i32]*> [#uses=1]
+@a1 = constant [2 x i32] [i32 1, i32 2] ; <[2 x i32]*> [#uses=1]
+@e = internal constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16 ; <[2 x [2 x i32]]*> [#uses=1]
+@e1 = constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16 ; <[2 x [2 x i32]]*> [#uses=1]
+@p = constant i8* bitcast ([2 x i32]* @a to i8*) ; <i8**> [#uses=0]
+@t = constant i8* bitcast ([2 x [2 x i32]]* @e to i8*) ; <i8**> [#uses=0]
+@p1 = constant i8* bitcast ([2 x i32]* @a1 to i8*) ; <i8**> [#uses=0]
+@t1 = constant i8* bitcast ([2 x [2 x i32]]* @e1 to i8*) ; <i8**> [#uses=0]
OpenPOWER on IntegriCloud