diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-06-12 21:27:20 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-06-12 21:27:20 +0200 |
commit | 46ef71a74329a0777e3464c65927cd3e59c928d6 (patch) | |
tree | e8c06aeb70dcbe18acdf6db1f88a1452ac1dca68 /test/CodeGen/X86/compact-unwind.ll | |
parent | 32c493313c30abe0830e95dc92c7ad1c2241ba57 (diff) | |
parent | ce337502f5a88500df9ab2f59ab48f97be0b4395 (diff) | |
download | llvm-46ef71a74329a0777e3464c65927cd3e59c928d6.tar.gz llvm-46ef71a74329a0777e3464c65927cd3e59c928d6.tar.bz2 llvm-46ef71a74329a0777e3464c65927cd3e59c928d6.tar.xz |
Merge branch 'release_33' of git://github.com/llvm-mirror/llvm into embtk-support-release-3.3
Diffstat (limited to 'test/CodeGen/X86/compact-unwind.ll')
-rw-r--r-- | test/CodeGen/X86/compact-unwind.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGen/X86/compact-unwind.ll b/test/CodeGen/X86/compact-unwind.ll new file mode 100644 index 0000000000..8c4fa27da5 --- /dev/null +++ b/test/CodeGen/X86/compact-unwind.ll @@ -0,0 +1,30 @@ +; RUN: llc < %s -disable-cfi -disable-fp-elim -mtriple x86_64-apple-darwin11 | FileCheck %s + +%ty = type { i8* } + +@gv = external global i32 + +; This is aligning the stack with a push of a random register. +; CHECK: pushq %rax + +; Even though we can't encode %rax into the compact unwind, We still want to be +; able to generate a compact unwind encoding in this particular case. +; +; CHECK: __LD,__compact_unwind +; CHECK: _foo ## Range Start +; CHECK: 16842753 ## Compact Unwind Encoding: 0x1010001 + +define i8* @foo(i64 %size) { + %addr = alloca i64, align 8 + %tmp20 = load i32* @gv, align 4 + %tmp21 = call i32 @bar() + %tmp25 = load i64* %addr, align 8 + %tmp26 = inttoptr i64 %tmp25 to %ty* + %tmp29 = getelementptr inbounds %ty* %tmp26, i64 0, i32 0 + %tmp34 = load i8** %tmp29, align 8 + %tmp35 = getelementptr inbounds i8* %tmp34, i64 %size + store i8* %tmp35, i8** %tmp29, align 8 + ret i8* null +} + +declare i32 @bar() |