diff options
| author | Owen Anderson <resistor@mac.com> | 2012-05-30 18:54:50 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2012-05-30 18:54:50 +0000 |
| commit | 0eda3e1de66a6ad8aaa902afcb602b7a19d398da (patch) | |
| tree | 63b424f6b66b0d32b9e7b6a57c74a44f78dd7751 /llvm | |
| parent | c7aaf523e17788dba8b993a224295945dae52d98 (diff) | |
| download | bcm5719-llvm-0eda3e1de66a6ad8aaa902afcb602b7a19d398da.tar.gz bcm5719-llvm-0eda3e1de66a6ad8aaa902afcb602b7a19d398da.zip | |
Switch the canonical FMA term operand order to match both the comment I wrote and the usual LLVM convention.
llvm-svn: 157708
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/fusedMAC.ll | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 647ff6b6b20..3b8489f03b9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -5771,7 +5771,7 @@ SDValue DAGCombiner::visitFMA(SDNode *N) { return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, N2); // Canonicalize (fma c, x, y) -> (fma x, c, y) - if (!N0CFP && N1CFP) + if (N0CFP && !N1CFP) return DAG.getNode(ISD::FMA, N->getDebugLoc(), VT, N1, N0, N2); return SDValue(); diff --git a/llvm/test/CodeGen/ARM/fusedMAC.ll b/llvm/test/CodeGen/ARM/fusedMAC.ll index 8ebca02df99..da0789ec3e5 100644 --- a/llvm/test/CodeGen/ARM/fusedMAC.ll +++ b/llvm/test/CodeGen/ARM/fusedMAC.ll @@ -192,7 +192,7 @@ define float @test_fma_const_fold(float %a, float %b) nounwind { define float @test_fma_canonicalize(float %a, float %b) nounwind { ; CHECK: test_fma_canonicalize ; CHECK: vmov.f32 s0 -; CHECK: vfma.f32 s2, s0, s1 +; CHECK: vfma.f32 s2, s1, s0 %ret = call float @llvm.fma.f32(float 2.0, float %a, float %b) ret float %ret } |

