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 <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This commit is contained in:
Mike Klein 2020-02-28 12:01:24 -06:00 committed by Skia Commit-Bot
parent 22c007da34
commit fe6fa7ebb8

View File

@ -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: