diff options
| author | Lang Hames <lhames@gmail.com> | 2014-01-23 20:23:36 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2014-01-23 20:23:36 +0000 |
| commit | 23de211c5d9faa247bafae19ad468315f8cc0a53 (patch) | |
| tree | b666972c920b4c4f21d254f26b0f242edc2ba654 /llvm/test/CodeGen | |
| parent | ff856f4c4e1d4ecab4f18306a7bcd62e923b902d (diff) | |
| download | bcm5719-llvm-23de211c5d9faa247bafae19ad468315f8cc0a53.tar.gz bcm5719-llvm-23de211c5d9faa247bafae19ad468315f8cc0a53.zip | |
Replace vfmaddxx213 instructions with their 231-type equivalents in accumulator
loops. Writing back to the accumulator (231-type) allows the coalescer to
eliminate an extra copy.
llvm-svn: 199933
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/fma.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fma.ll b/llvm/test/CodeGen/X86/fma.ll index 917eac0ca32..0cdf3cdf574 100644 --- a/llvm/test/CodeGen/X86/fma.ll +++ b/llvm/test/CodeGen/X86/fma.ll @@ -42,6 +42,21 @@ entry: ret float %call } +; Test FMA3 variant selection +; CHECK: fma3_select231: +; CHECK: vfmadd231ss +define float @fma3_select231(float %x, float %y, i32 %N) #0 { +entry: + br label %while.body +while.body: ; preds = %while.body, %while.body + %acc.01 = phi float [ 0.000000e+00, %entry ], [ %acc, %while.body ] + %acc = tail call float @llvm.fma.f32(float %x, float %y, float %acc.01) nounwind readnone + %b = fcmp ueq float %acc, 0.0 + br i1 %b, label %while.body, label %while.end +while.end: ; preds = %while.body, %entry + ret float %acc +} + declare float @llvm.fma.f32(float, float, float) nounwind readnone declare double @llvm.fma.f64(double, double, double) nounwind readnone declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) nounwind readnone |

