OSDN Git Service

Optimize floating-point minimum/maximum operations.
authorNicolas Capens <capn@google.com>
Mon, 13 Feb 2017 16:27:34 +0000 (11:27 -0500)
committerJim Stichnoth <stichnot@chromium.org>
Mon, 13 Feb 2017 16:57:59 +0000 (16:57 +0000)
commit47b6ba6db7c8b8dd36ac54dbd19ae7b4a5b77424
tree7330b1065d6a8f252450b2902bc9d2e8b73ccc96
parenteb568f5569b3a25346eb601898baf6fe774f6d4a
Optimize floating-point minimum/maximum operations.

Combine a floating-point compare + select into min/max operations on
x86 using SSE2 instructions, where equivalent. Only handles the most
common cases for now (but for both scalars and vectors):

x > y ? x : y -> max
x < y ? x : y -> min

BUG=swiftshader:19

Change-Id: Ic87bfa90cefd8014af5624d85a2ecef1c891e328
Reviewed-on: https://chromium-review.googlesource.com/439814
Reviewed-by: Jim Stichnoth <stichnot@chromium.org>
src/IceTargetLoweringX86BaseImpl.h
tests_lit/llvm2ice_tests/fp.cmp.ll