Allow trivial non-constant expressions to use SpvOpSelect.

Previously, we would only use OpSelect when choosing between two
scalar constant values, and in all other cases would convert
ternary expressions to an if-else block. We now also choose
OpSelect for "trivial expressions" (variable references, swizzles,
array accesses, field accesses), and support vectors as well as
scalars.

This has a wide-reaching impact on our test suite, because most
tests end in `return something ? colorGreen : colorRed;`. This
expression will now use OpSelect.

(The HLSL expansion of OpSelect is intriguingly bad, but hopefully
this is not an issue in practice.)

Change-Id: Ia31d42d27b51b801deb17a69c89bff65d949c99d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/706678
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
311 files changed