mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Apply the SSE dependence idiom for SSE unary operations to
SD instructions too, in addition to SS instructions. And add a comment about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,3 +19,44 @@ entry:
|
||||
%1 = fptrunc double %0 to float
|
||||
ret float %1
|
||||
}
|
||||
|
||||
define float @squirtf(float* %x) nounwind {
|
||||
entry:
|
||||
; CHECK: squirtf:
|
||||
; CHECK: movss (%rdi), %xmm0
|
||||
; CHECK: sqrtss %xmm0, %xmm0
|
||||
%z = load float* %x
|
||||
%t = call float @llvm.sqrt.f32(float %z)
|
||||
ret float %t
|
||||
}
|
||||
|
||||
define double @squirt(double* %x) nounwind {
|
||||
entry:
|
||||
; CHECK: squirt:
|
||||
; CHECK: movsd (%rdi), %xmm0
|
||||
; CHECK: sqrtsd %xmm0, %xmm0
|
||||
%z = load double* %x
|
||||
%t = call double @llvm.sqrt.f64(double %z)
|
||||
ret double %t
|
||||
}
|
||||
|
||||
define float @squirtf_size(float* %x) nounwind optsize {
|
||||
entry:
|
||||
; CHECK: squirtf_size:
|
||||
; CHECK: sqrtss (%rdi), %xmm0
|
||||
%z = load float* %x
|
||||
%t = call float @llvm.sqrt.f32(float %z)
|
||||
ret float %t
|
||||
}
|
||||
|
||||
define double @squirt_size(double* %x) nounwind optsize {
|
||||
entry:
|
||||
; CHECK: squirt_size:
|
||||
; CHECK: sqrtsd (%rdi), %xmm0
|
||||
%z = load double* %x
|
||||
%t = call double @llvm.sqrt.f64(double %z)
|
||||
ret double %t
|
||||
}
|
||||
|
||||
declare float @llvm.sqrt.f32(float)
|
||||
declare double @llvm.sqrt.f64(double)
|
||||
|
Reference in New Issue
Block a user