mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user