gallivm: fix saturated signed add / sub with llvm 9
authorRoland Scheidegger <sroland@vmware.com>
Wed, 17 Apr 2019 00:34:01 +0000 (02:34 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 17 Apr 2019 15:42:13 +0000 (17:42 +0200)
commitdded2edf8bedb9a5bafd7788e52dc8e714527186
treee736c1212250abcc87ea663f60a4c68426865a7a
parentb74e605cf47fe54c0d2a6df072c1874160cfd9eb
gallivm: fix saturated signed add / sub with llvm 9

llvm 8 removed saturated unsigned add / sub x86 sse2 intrinsics, and
now llvm 9 removed the signed versions as well - they were proposed for
removal earlier, but the pattern to recognize those was very complex,
so it wasn't done then. However, instead of these arch-specific
intrinsics, there's now arch-independent intrinsics for saturated
add / sub, both for signed and unsigned, so use these.
They should have only advantages (work with arbitrary vector sizes,
optimal code for all archs), although I don't know how well they work
in practice for other archs (at least for x86 they do the right thing).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110454

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c