diff options
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/asm-modifier2.ll | 53 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll | 4 |
2 files changed, 55 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/asm-modifier2.ll b/llvm/test/CodeGen/X86/asm-modifier2.ll new file mode 100644 index 00000000000..fba2f9a1e47 --- /dev/null +++ b/llvm/test/CodeGen/X86/asm-modifier2.ll @@ -0,0 +1,53 @@ +; RUN: llc < %s | FileCheck %s + +define void @test1() { +; CHECK-LABEL: test1: +; CHECK: vmovaps %xmm0, %xmm0 +; CHECK: vmovaps %ymm0, %ymm0 +; CHECK: vmovaps %zmm0, %zmm0 + tail call void asm sideeffect "vmovaps ${0:x}, ${0:x}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "vmovaps ${0:t}, ${0:t}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "vmovaps ${0:g}, ${0:g}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + ret void +} + +define void @test2() { +; CHECK-LABEL: test2: +; CHECK: vmovaps %xmm0, %xmm0 +; CHECK: vmovaps %ymm0, %ymm0 +; CHECK: vmovaps %zmm0, %zmm0 + tail call void asm sideeffect inteldialect "vmovaps ${0:x}, ${0:x}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "vmovaps ${0:t}, ${0:t}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "vmovaps ${0:g}, ${0:g}", "{xmm0},~{dirflag},~{fpsr},~{flags}"(i32 0) + ret void +} + +define void @test3() { +; CHECK-LABEL: test3: +; CHECK: movb %al, %al +; CHECK: movb %ah, %ah +; CHECK: movw %ax, %ax +; CHECK: movl %eax, %eax +; CHECK: movq %rax, %rax + tail call void asm sideeffect "mov ${0:b}, ${0:b}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "mov ${0:h}, ${0:h}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "mov ${0:w}, ${0:w}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "mov ${0:k}, ${0:k}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect "mov ${0:q}, ${0:q}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + ret void +} + +define void @test4() { +; CHECK-LABEL: test4: +; CHECK: movb %al, %al +; CHECK: movb %ah, %ah +; CHECK: movw %ax, %ax +; CHECK: movl %eax, %eax +; CHECK: movq %rax, %rax + tail call void asm sideeffect inteldialect "mov ${0:b}, ${0:b}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "mov ${0:h}, ${0:h}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "mov ${0:w}, ${0:w}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "mov ${0:k}, ${0:k}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + tail call void asm sideeffect inteldialect "mov ${0:q}, ${0:q}", "{eax},~{dirflag},~{fpsr},~{flags}"(i32 0) + ret void +} diff --git a/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll b/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll index 819b9fcfa79..9f6e84f2f89 100644 --- a/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll +++ b/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll @@ -1,8 +1,8 @@ ; RUN: not llc -mtriple=x86_64-- < %s 2>&1 | FileCheck %s -;CHECK: error: invalid operand in inline asm: 'vmovd ${1:x}, $0' +;CHECK: error: invalid operand in inline asm: 'vmovd ${1:k}, $0' define i32 @foo() { entry: - %0 = tail call i32 asm sideeffect "vmovd ${1:x}, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(<2 x i64> <i64 240518168632, i64 240518168632>) + %0 = tail call i32 asm sideeffect "vmovd ${1:k}, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(<2 x i64> <i64 240518168632, i64 240518168632>) ret i32 %0 } |