[llvm-commits] [llvm] r82786 - in /llvm/trunk/test/CodeGen/X86: negative-sin.ll sincos.ll
Dale Johannesen
dalej at apple.com
Fri Sep 25 11:15:29 PDT 2009
Author: johannes
Date: Fri Sep 25 13:15:29 2009
New Revision: 82786
URL: http://llvm.org/viewvc/llvm-project?rev=82786&view=rev
Log:
Add readonly to some sin and cos calls; transformations
being checked aren't valid without it.
Modified:
llvm/trunk/test/CodeGen/X86/negative-sin.ll
llvm/trunk/test/CodeGen/X86/sincos.ll
Modified: llvm/trunk/test/CodeGen/X86/negative-sin.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/negative-sin.ll?rev=82786&r1=82785&r2=82786&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/negative-sin.ll (original)
+++ llvm/trunk/test/CodeGen/X86/negative-sin.ll Fri Sep 25 13:15:29 2009
@@ -6,7 +6,7 @@
define double @foo(double %e)
{
%f = fsub double 0.0, %e
- %g = call double @sin(double %f)
+ %g = call double @sin(double %f) readonly
%h = fsub double 0.0, %g
ret double %h
}
Modified: llvm/trunk/test/CodeGen/X86/sincos.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sincos.ll?rev=82786&r1=82785&r2=82786&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sincos.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sincos.ll Fri Sep 25 13:15:29 2009
@@ -4,45 +4,45 @@
; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
; RUN: grep cos\$ | count 3
-declare float @sinf(float)
+declare float @sinf(float) readonly
-declare double @sin(double)
+declare double @sin(double) readonly
-declare x86_fp80 @sinl(x86_fp80)
+declare x86_fp80 @sinl(x86_fp80) readonly
define float @test1(float %X) {
- %Y = call float @sinf(float %X)
+ %Y = call float @sinf(float %X) readonly
ret float %Y
}
define double @test2(double %X) {
- %Y = call double @sin(double %X)
+ %Y = call double @sin(double %X) readonly
ret double %Y
}
define x86_fp80 @test3(x86_fp80 %X) {
- %Y = call x86_fp80 @sinl(x86_fp80 %X)
+ %Y = call x86_fp80 @sinl(x86_fp80 %X) readonly
ret x86_fp80 %Y
}
-declare float @cosf(float)
+declare float @cosf(float) readonly
-declare double @cos(double)
+declare double @cos(double) readonly
-declare x86_fp80 @cosl(x86_fp80)
+declare x86_fp80 @cosl(x86_fp80) readonly
define float @test4(float %X) {
- %Y = call float @cosf(float %X)
+ %Y = call float @cosf(float %X) readonly
ret float %Y
}
define double @test5(double %X) {
- %Y = call double @cos(double %X)
+ %Y = call double @cos(double %X) readonly
ret double %Y
}
define x86_fp80 @test6(x86_fp80 %X) {
- %Y = call x86_fp80 @cosl(x86_fp80 %X)
+ %Y = call x86_fp80 @cosl(x86_fp80 %X) readonly
ret x86_fp80 %Y
}
More information about the llvm-commits
mailing list