aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-05 01:45:08 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-05 01:45:08 +0000
commit45beb482c4f7c30f4d0bce962e4491ba2abc2e78 (patch)
tree4a1fb13a3081bbe42a4b591ce46b0a7bb5163e7e /test
parent8ed680cce3d0cff361f352abce75a917093f0656 (diff)
downloadexternal_llvm-45beb482c4f7c30f4d0bce962e4491ba2abc2e78.zip
external_llvm-45beb482c4f7c30f4d0bce962e4491ba2abc2e78.tar.gz
external_llvm-45beb482c4f7c30f4d0bce962e4491ba2abc2e78.tar.bz2
New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2007-06-04-X86-64-CtorAsmBugs.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2007-06-04-X86-64-CtorAsmBugs.ll b/test/CodeGen/X86/2007-06-04-X86-64-CtorAsmBugs.ll
new file mode 100644
index 0000000..5d09075
--- /dev/null
+++ b/test/CodeGen/X86/2007-06-04-X86-64-CtorAsmBugs.ll
@@ -0,0 +1,28 @@
+; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | not grep GOTPCREL
+; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep ".align.*3"
+
+ %struct.A = type { [1024 x i8] }
+@_ZN1A1aE = global %struct.A zeroinitializer, align 32 ; <%struct.A*> [#uses=1]
+@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN1A1aE } ] ; <[1 x { i32, void ()* }]*> [#uses=0]
+
+define internal void @_GLOBAL__I__ZN1A1aE() section "__TEXT,__StaticInit,regular,pure_instructions" {
+entry:
+ br label %bb.i
+
+bb.i: ; preds = %bb.i, %entry
+ %i.1.i1.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb.i ] ; <i32> [#uses=2]
+ %tmp1012.i = sext i32 %i.1.i1.0 to i64 ; <i64> [#uses=1]
+ %tmp13.i = getelementptr %struct.A* @_ZN1A1aE, i32 0, i32 0, i64 %tmp1012.i ; <i8*> [#uses=1]
+ store i8 0, i8* %tmp13.i
+ %indvar.next = add i32 %i.1.i1.0, 1 ; <i32> [#uses=2]
+ %exitcond = icmp eq i32 %indvar.next, 1024 ; <i1> [#uses=1]
+ br i1 %exitcond, label %_Z41__static_initialization_and_destruction_0ii.exit, label %bb.i
+
+_Z41__static_initialization_and_destruction_0ii.exit: ; preds = %bb.i
+ ret void
+}
+
+define i32 @main(i32 %argc, i8** %argv) {
+entry:
+ ret i32 0
+}