diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-04-11 01:21:25 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-04-11 01:21:25 +0000 |
commit | 67a09fc397b9185c082c381e8885fd81a7bac838 (patch) | |
tree | c50d52ab4fc8a0d45df22c441b14bc1de73aa8f8 /llvm/test/CodeGen/ARM | |
parent | 74c282b5effdd3c717a454074866cce27f984f96 (diff) | |
download | bcm5719-llvm-67a09fc397b9185c082c381e8885fd81a7bac838.tar.gz bcm5719-llvm-67a09fc397b9185c082c381e8885fd81a7bac838.zip |
Match (fneg (fma) to vfnma. rdar://10139676
llvm-svn: 154469
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r-- | llvm/test/CodeGen/ARM/fusedMAC.ll | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/ARM/fusedMAC.ll b/llvm/test/CodeGen/ARM/fusedMAC.ll index 381eb437e04..b5398c7a587 100644 --- a/llvm/test/CodeGen/ARM/fusedMAC.ll +++ b/llvm/test/CodeGen/ARM/fusedMAC.ll @@ -99,30 +99,49 @@ define <4 x float> @fusedMACTest12(<4 x float> %a, <4 x float> %b) { ret <4 x float> %sub } -define float @test_f32(float %a, float %b, float %c) nounwind readnone ssp { +define float @test_fma_f32(float %a, float %b, float %c) nounwind readnone ssp { entry: -; CHECK: test_f32 +; CHECK: test_fma_f32 ; CHECK: vfma.f32 %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone ret float %call } -define double @test_f64(double %a, double %b, double %c) nounwind readnone ssp { +define double @test_fma_f64(double %a, double %b, double %c) nounwind readnone ssp { entry: -; CHECK: test_f64 +; CHECK: test_fma_f64 ; CHECK: vfma.f64 %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone ret double %call } -define <2 x float> @test_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind readnone ssp { +define <2 x float> @test_fma_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind readnone ssp { entry: -; CHECK: test_v2f32 +; CHECK: test_fma_v2f32 ; CHECK: vfma.f32 %0 = tail call <2 x float> @llvm.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind ret <2 x float> %0 } +define float @test_fnma_f32(float %a, float %b, float %c) nounwind readnone ssp { +entry: +; CHECK: test_fnma_f32 +; CHECK: vfnma.f32 + %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone + %tmp1 = fsub float -0.0, %call + %tmp2 = fsub float %tmp1, %c + ret float %tmp2 +} + +define double @test_fnma_f64(double %a, double %b, double %c) nounwind readnone ssp { +entry: +; CHECK: test_fnma_f64 +; CHECK: vfnma.f64 + %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone + %tmp = fsub double -0.0, %call + ret double %tmp +} + 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 |