OSDN Git Service

gallivm: don't use integer min/max sse intrinsics with llvm >= 3.9
authorRoland Scheidegger <sroland@vmware.com>
Sun, 19 Jun 2016 01:56:11 +0000 (03:56 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 21 Jun 2016 10:31:08 +0000 (11:31 +0100)
commitf675339b224b90cac161840716fcc348926f88c7
tree4ae963744649441d6fa719a2ae95d8f383efbf09
parentcdbcd315b337f3cd7eb76d0d9771113b527e5940
gallivm: don't use integer min/max sse intrinsics with llvm >= 3.9

Apparently, these are deprecated. There's some AutoUpgrade feature which
is supposed to promote these to cmp/select, which apparently doesn't work
with jit code. It is possible it's not actually even meant to work (see
the bug filed against llvm which couldn't provide an answer neither)
but in any case this is meant to be only temporary unless the intrinsics
are really illegal. So, just use the fallback code (which should be cmp/select,
we're actually doing cmp/sext/trunc/select, but in any case llvm 3.9 manages
to optimize this back to pmin/pmax in the end).

This addresses https://llvm.org/bugs/show_bug.cgi?id=28176

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Aaron Watry <awatry@gmail.com>
(cherry picked from commit b0cf99165af445adc4c5c1f66a3a3e0d882211cd)
src/gallium/auxiliary/gallivm/lp_bld_arit.c