[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/fma.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 8 21:01:45 PDT 2005



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

fma.ll added (r1.1)
---
Log message:

add a partial test for the fma operations that ppc supports.  I'm sure I'm
missing some and not all of these match yet, but I'm sure that Nate will 
clean up my mess :)


---
Diffs of the changes:  (+30 -0)

 fma.ll |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/fma.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/fma.ll:1.1
*** /dev/null	Fri Apr  8 23:01:42 2005
--- llvm/test/Regression/CodeGen/PowerPC/fma.ll	Fri Apr  8 23:01:32 2005
***************
*** 0 ****
--- 1,30 ----
+ ; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-pattern-isel | grep 'fn\?madd\|fn\?msub' | wc -l | grep 5
+ 
+ double %test_FMADD(double %A, double %B, double %C) {
+ 	%D = mul double %A, %B
+ 	%E = add double %D, %C
+ 	ret double %E
+ }
+ double %test_FMSUB(double %A, double %B, double %C) {
+ 	%D = mul double %A, %B
+ 	%E = sub double %D, %C
+ 	ret double %E
+ }
+ double %test_FNMADD1(double %A, double %B, double %C) {
+ 	%D = mul double %A, %B
+ 	%E = sub double %D, %C
+ 	%F = sub double -0.0, %E
+ 	ret double %F
+ }
+ double %test_FNMADD2(double %A, double %B, double %C) {
+ 	%D = mul double %A, %B
+ 	%E = add double %D, %C
+ 	%F = sub double -0.0, %E
+ 	ret double %F
+ }
+ double %test_FNMADD3(double %A, double %B, double %C) {
+ 	%D = mul double %A, %B
+ 	%E = add double %C, %D
+ 	%F = sub double -0.0, %E
+ 	ret double %F
+ }






More information about the llvm-commits mailing list