gallivm: don't use pabs intrinsic with llvm version >= 6
authorRoland Scheidegger <sroland@vmware.com>
Fri, 6 Oct 2017 22:52:58 +0000 (00:52 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 6 Oct 2017 22:54:09 +0000 (00:54 +0200)
commit52b73caaf40e79c90a105ec6d349abb3398e3c6b
treecacc8ba9fdfb6ff97314a33d2b8cb368441120b6
parent9716c69e22613229bdc78c0a28491f39bec2520d
gallivm: don't use pabs intrinsic with llvm version >= 6

The intrinsic is gone, causing shader compilation to crash.
While here, also change the fallback code to match what llvm's auto-updater
of these intrinsics would do (except that there will still be zext/trunc
instructions in there), which should ensure that the sequence gets recognized
and fused back into a pabs in the end (I didn't test this, and it's possible
even the old sequence would get recognized, but I don't see a reason why we
shouldn't use the same sequence in any case).

Tested-by: Vinson Lee <vlee@freedesktop.org>
src/gallium/auxiliary/gallivm/lp_bld_arit.c