Relax expressions and add explicit triplets -linux and -win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2011-02-22 07:19:20 +00:00
parent 52ae4cac4e
commit 007b2b3c7e

View File

@ -1,9 +1,10 @@
; RUN: llc < %s -march=x86-64 -mattr=+sse2 | FileCheck %s ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse2 | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse2 | FileCheck %s
define double @t1(float* nocapture %x) nounwind readonly ssp { define double @t1(float* nocapture %x) nounwind readonly ssp {
entry: entry:
; CHECK: t1: ; CHECK: t1:
; CHECK: movss (%rdi), %xmm0 ; CHECK: movss ([[A0:%rdi|%rcx]]), %xmm0
; CHECK: cvtss2sd %xmm0, %xmm0 ; CHECK: cvtss2sd %xmm0, %xmm0
%0 = load float* %x, align 4 %0 = load float* %x, align 4
@ -14,7 +15,7 @@ entry:
define float @t2(double* nocapture %x) nounwind readonly ssp optsize { define float @t2(double* nocapture %x) nounwind readonly ssp optsize {
entry: entry:
; CHECK: t2: ; CHECK: t2:
; CHECK: cvtsd2ss (%rdi), %xmm0 ; CHECK: cvtsd2ss ([[A0]]), %xmm0
%0 = load double* %x, align 8 %0 = load double* %x, align 8
%1 = fptrunc double %0 to float %1 = fptrunc double %0 to float
ret float %1 ret float %1
@ -23,7 +24,7 @@ entry:
define float @squirtf(float* %x) nounwind { define float @squirtf(float* %x) nounwind {
entry: entry:
; CHECK: squirtf: ; CHECK: squirtf:
; CHECK: movss (%rdi), %xmm0 ; CHECK: movss ([[A0]]), %xmm0
; CHECK: sqrtss %xmm0, %xmm0 ; CHECK: sqrtss %xmm0, %xmm0
%z = load float* %x %z = load float* %x
%t = call float @llvm.sqrt.f32(float %z) %t = call float @llvm.sqrt.f32(float %z)
@ -33,7 +34,7 @@ entry:
define double @squirt(double* %x) nounwind { define double @squirt(double* %x) nounwind {
entry: entry:
; CHECK: squirt: ; CHECK: squirt:
; CHECK: movsd (%rdi), %xmm0 ; CHECK: movsd ([[A0]]), %xmm0
; CHECK: sqrtsd %xmm0, %xmm0 ; CHECK: sqrtsd %xmm0, %xmm0
%z = load double* %x %z = load double* %x
%t = call double @llvm.sqrt.f64(double %z) %t = call double @llvm.sqrt.f64(double %z)
@ -43,7 +44,7 @@ entry:
define float @squirtf_size(float* %x) nounwind optsize { define float @squirtf_size(float* %x) nounwind optsize {
entry: entry:
; CHECK: squirtf_size: ; CHECK: squirtf_size:
; CHECK: sqrtss (%rdi), %xmm0 ; CHECK: sqrtss ([[A0]]), %xmm0
%z = load float* %x %z = load float* %x
%t = call float @llvm.sqrt.f32(float %z) %t = call float @llvm.sqrt.f32(float %z)
ret float %t ret float %t
@ -52,7 +53,7 @@ entry:
define double @squirt_size(double* %x) nounwind optsize { define double @squirt_size(double* %x) nounwind optsize {
entry: entry:
; CHECK: squirt_size: ; CHECK: squirt_size:
; CHECK: sqrtsd (%rdi), %xmm0 ; CHECK: sqrtsd ([[A0]]), %xmm0
%z = load double* %x %z = load double* %x
%t = call double @llvm.sqrt.f64(double %z) %t = call double @llvm.sqrt.f64(double %z)
ret double %t ret double %t