diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-03-22 23:25:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-03-22 23:25:07 +0000 |
commit | acb5310542b82e7acf5f5a91fa619e4b7efeff5c (patch) | |
tree | 467f3b268bcdf901a2450cf1f173703f6d135ea6 /test/CodeGen/asm-inout.c | |
parent | bce35a221752a1ca6d2a70e8592b47b7cc1ec90d (diff) |
When an MMX output variable is tied to the input variable, we have to implicitly
cast the value to x86_mmx. This gives the ASM string the correct call signature.
<rdar://problem/10919182>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/asm-inout.c')
-rw-r--r-- | test/CodeGen/asm-inout.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c index ce524fe70f..423bc4e82a 100644 --- a/test/CodeGen/asm-inout.c +++ b/test/CodeGen/asm-inout.c @@ -37,3 +37,12 @@ int test4(volatile int *addr) { return (int)oldval; // CHECK: call i8 asm "frob $0", "=r,0{{.*}}"(i8 -1) } + +// <rdar://problem/10919182> - This should have both inputs be of type x86_mmx. +// CHECK: @test5 +typedef long long __m64 __attribute__((__vector_size__(8))); +__m64 test5(__m64 __A, __m64 __B) { + // CHECK: call x86_mmx asm "pmulhuw $1, $0\0A\09", "=y,y,0,~{dirflag},~{fpsr},~{flags}"(x86_mmx %{{.}}, x86_mmx %{{.}}) + asm("pmulhuw %1, %0\n\t" : "+y" (__A) : "y" (__B)); + return __A; +} |