diff options
author | Eli Friedman <efriedma@quicinc.com> | 2019-03-14 19:46:51 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2019-03-14 19:46:51 +0000 |
commit | f891c225aa074b7566d78cd3851b55f3e7261fbf (patch) | |
tree | 37790e6b91d33ae1c3d6dda2cbf2271b712c1c3b /test/CodeGen/asm-inout.c | |
parent | bcc9b7f48e0e739f34114f6776a8ae317cbe9a56 (diff) |
[CodeGen] Consider tied operands when adjusting inline asm operands.
The constraint "0" in the following asm did not consider the its
relationship with "=y" when try to replace the type of the operands.
asm ("nop" : "=y"(Mu8_1 ) : "0"(Mu8_0 ));
Patch by Xiang Zhang.
Differential Revision: https://reviews.llvm.org/D56990
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356196 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 e5da5c5e93..411f6fadac 100644 --- a/test/CodeGen/asm-inout.c +++ b/test/CodeGen/asm-inout.c @@ -46,3 +46,12 @@ __m64 test5(__m64 __A, __m64 __B) { asm ("pmulhuw %1, %0\n\t" : "+y" (__A) : "y" (__B)); return __A; } + +// CHECK: @test6 +int test6(void) { + typedef unsigned char __attribute__((vector_size(8))) _m64u8; + _m64u8 __attribute__((aligned(16))) Mu8_0, __attribute__((aligned(16))) Mu8_1; + // CHECK: call x86_mmx asm "nop", "=y,0,~{dirflag},~{fpsr},~{flags}"(x86_mmx %1) + asm ("nop" : "=y"(Mu8_1 ) : "0"(Mu8_0 )); + return 0; +} |