summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/fma.ll
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-04-09 08:29:59 +0000
committerNate Begeman <natebegeman@mac.com>2005-04-09 08:29:59 +0000
commite9c0f43a1b46eb2024dbd983bb24d0f098526595 (patch)
tree435d3e6061c6e34f84e8cfa22f5585de24a4b2f6 /test/CodeGen/PowerPC/fma.ll
parent67ac5f459e6ced8e921b4b04a74ffb75a93cfa95 (diff)
downloadllvm-e9c0f43a1b46eb2024dbd983bb24d0f098526595.tar.gz
llvm-e9c0f43a1b46eb2024dbd983bb24d0f098526595.tar.bz2
llvm-e9c0f43a1b46eb2024dbd983bb24d0f098526595.tar.xz
Add cases to cover the rest of the patterns we should be matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/fma.ll')
-rw-r--r--test/CodeGen/PowerPC/fma.ll22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/CodeGen/PowerPC/fma.ll b/test/CodeGen/PowerPC/fma.ll
index 26b8aac204..7c39ecf82b 100644
--- a/test/CodeGen/PowerPC/fma.ll
+++ b/test/CodeGen/PowerPC/fma.ll
@@ -1,6 +1,11 @@
-; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-pattern-isel | grep 'fn\?madd\|fn\?msub' | wc -l | grep 5
+; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-pattern-isel | grep 'fn\?madd\|fn\?msub' | wc -l | grep 7
-double %test_FMADD(double %A, double %B, double %C) {
+double %test_FMADD1(double %A, double %B, double %C) {
+ %D = mul double %A, %B
+ %E = add double %D, %C
+ ret double %E
+}
+double %test_FMADD2(double %A, double %B, double %C) {
%D = mul double %A, %B
%E = add double %D, %C
ret double %E
@@ -12,19 +17,24 @@ double %test_FMSUB(double %A, double %B, double %C) {
}
double %test_FNMADD1(double %A, double %B, double %C) {
%D = mul double %A, %B
- %E = sub double %D, %C
+ %E = add 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
+ %E = add double %C, %D
%F = sub double -0.0, %E
ret double %F
}
-double %test_FNMADD3(double %A, double %B, double %C) {
+double %test_FNMSUB1(double %A, double %B, double %C) {
%D = mul double %A, %B
- %E = add double %C, %D
+ %E = sub double %C, %D
+ ret double %E
+}
+double %test_FNMSUB2(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
}