diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
commit | 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (patch) | |
tree | f5944309621cee4fe0976be6f9ac619b7ebfc4c2 /test/CodeGen/X86/opaque-constant-asm.ll | |
parent | 68bcb7db193e4bc81430063148253d30a791023e (diff) | |
download | src-test2-5ca98fd98791947eba83a1ed3f2c8191ef7afa6c.tar.gz src-test2-5ca98fd98791947eba83a1ed3f2c8191ef7afa6c.zip |
Notes
Diffstat (limited to 'test/CodeGen/X86/opaque-constant-asm.ll')
-rw-r--r-- | test/CodeGen/X86/opaque-constant-asm.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/opaque-constant-asm.ll b/test/CodeGen/X86/opaque-constant-asm.ll new file mode 100644 index 000000000000..dd1cc8ec4839 --- /dev/null +++ b/test/CodeGen/X86/opaque-constant-asm.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -no-integrated-as | FileCheck %s +; This tests makes sure that we not mistake the bitcast inside the asm statement +; as an opaque constant. If we do, then the compilation will simply fail. + +%struct2 = type <{ i32, i32, i32, i32 }> +%union.anon = type { [2 x i64], [4 x i32] } +%struct1 = type { i32, %union.anon } + +define void @test() { +; CHECK: #ASM $16 + call void asm sideeffect "#ASM $0", "n"(i32 ptrtoint (i32* getelementptr inbounds (%struct2* bitcast (%union.anon* getelementptr inbounds (%struct1* null, i32 0, i32 1) to %struct2*), i32 0, i32 2) to i32)) + ret void +} |