ac/nir: add a workaround for bitfield_extract when count is 0
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Jul 2018 18:27:11 +0000 (20:27 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Jul 2018 18:41:10 +0000 (20:41 +0200)
commit3d41757788aca774e64297bed962696cc0c9b262
treeee88fde9cbaa3d53c40baa9a41467a553ee2e5d3
parente2e32b6afd4cd1cd091877b638288e861a537760
ac/nir: add a workaround for bitfield_extract when count is 0

LLVM 7 returns incorrect results when count is 0, something
has been broken since LLVM 6. Of course, the best solution is
to fix LLVM but this workaround works as expected for now.

Original workaround by Philippe Rebohle.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107276
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c