ac/nir: add always_vector argument to ac_build_gather_values_extended
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 25 Jun 2017 11:04:51 +0000 (13:04 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 31 Jul 2017 12:55:42 +0000 (14:55 +0200)
commitac2ab5acadb9b792b41e0cdb3c59b8edb6dde64b
treee77e2e28827b6ebbc46223abc7371517a90aadc7
parente247357240f4d429f954b5019852053683b6dd1c
ac/nir: add always_vector argument to ac_build_gather_values_extended

This simplifies a bunch of places that no longer need special treatment
of value_count == 1. We rely on LLVM to optimize away the 1-element vector
types.

This fixes a bunch of bugs where 1-element arrays are indexed indirectly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_build.c
src/amd/common/ac_llvm_build.h
src/amd/common/ac_nir_to_llvm.c