7b1620f366
Implement min and max using if_then_else(y<x,...) on vectors rather than recursing to std::min/std::max applied to scalars. But actually, factor out and use naive_if_then_else(), which Clang can reason through better than it can our specialized if_then_else(). This lets every min() or max() I've looked at compile down to ideal codegen, vmaxps, vpminsw, etc, where if you use if_then_else() you'd see the literal comparison and blend as written. I've been looking at q14x2 codegen in the interpreter, and most things were already good, unexpectedly even uavg_q14x2. The biggest surprise was how bad the min/max codegen was, and looking back, even the min_f32 and max_f32 codegen is super bad. This CL fixes all that, leaving us with the ideal codegen using the specific instruction you'd want, replacing a giant mess of code that recursed down to scalars. mul_q14x2 is still bad, but an easy follow up. Change-Id: I77b5d7c9aa20a9a2f5ceb3e40f1e18ace2a1b5c1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317310 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com> |
||
---|---|---|
animations | ||
bazel | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
demos.skia.org | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.bazelignore | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.bazel | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt | ||
WORKSPACE.bazel |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.