From fe6fa7ebb8af2daeac957574289b8ac3e9afebce Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Fri, 28 Feb 2020 12:01:24 -0600 Subject: [PATCH] allow fmas Conveniently, the fmuladd intrinsic decays to mul->add on machines that don't support fmas, not to some call out to a complicated library implementation. Just what we want! Change-Id: I6828a4e38ecd7f0595050f30784cd0ec8b03eb7a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274083 Commit-Queue: Mike Klein Reviewed-by: Herb Derby --- src/core/SkVM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp index b6a314de2e..e5496b7e17 100644 --- a/src/core/SkVM.cpp +++ b/src/core/SkVM.cpp @@ -2045,8 +2045,8 @@ namespace skvm { case Op::gte_f32: vals[i] = SE(b->CreateFCmpOGE(F(vals[x]), F(vals[y]))); break; case Op::mad_f32: - vals[i] = I(b->CreateFAdd(b->CreateFMul(F(vals[x]), F(vals[y])), - F(vals[z]))); + vals[i] = I(b->CreateIntrinsic(llvm::Intrinsic::fmuladd, {F32}, + {F(vals[x]), F(vals[y]), F(vals[z])})); break; case Op::floor: