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 :)

llvm-svn: 21168
This commit is contained in:
Chris Lattner 2005-04-09 04:01:32 +00:00
parent 8a98c7f337
commit b9a11b8b7f
1 changed files with 30 additions and 0 deletions

View File

@ -0,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
}