summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/fusedMAC.ll
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-05-30 18:50:39 +0000
committerOwen Anderson <resistor@mac.com>2012-05-30 18:50:39 +0000
commit85ef6f4c99aee3c2ed43bbe6d190541f283a7e43 (patch)
treeb90b49e7148d3c25421abd1693b6d2fbdecc20bb /test/CodeGen/ARM/fusedMAC.ll
parent06a23ea8083657270e86a178abf050246caac0b5 (diff)
downloadllvm-85ef6f4c99aee3c2ed43bbe6d190541f283a7e43.tar.gz
llvm-85ef6f4c99aee3c2ed43bbe6d190541f283a7e43.tar.bz2
llvm-85ef6f4c99aee3c2ed43bbe6d190541f283a7e43.tar.xz
Teach DAGCombine to canonicalize the position of a constant in the term operands of an FMA node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/fusedMAC.ll')
-rw-r--r--test/CodeGen/ARM/fusedMAC.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fusedMAC.ll b/test/CodeGen/ARM/fusedMAC.ll
index fd7fdd5405..8ebca02df9 100644
--- a/test/CodeGen/ARM/fusedMAC.ll
+++ b/test/CodeGen/ARM/fusedMAC.ll
@@ -189,6 +189,15 @@ define float @test_fma_const_fold(float %a, float %b) nounwind {
ret float %ret
}
+define float @test_fma_canonicalize(float %a, float %b) nounwind {
+; CHECK: test_fma_canonicalize
+; CHECK: vmov.f32 s0
+; CHECK: vfma.f32 s2, s0, s1
+ %ret = call float @llvm.fma.f32(float 2.0, float %a, float %b)
+ ret float %ret
+}
+
+
declare float @llvm.fma.f32(float, float, float) nounwind readnone
declare double @llvm.fma.f64(double, double, double) nounwind readnone
declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>) nounwind readnone