aco: improve readfirstlane after uniform LDS loads

Totals from affected shaders:
SGPRS: 976 -> 968 (-0.82 %)
VGPRS: 580 -> 584 (0.69 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 106032 -> 103076 (-2.79 %) bytes
Max Waves: 237 -> 237 (0.00 %)
Instructions: 19452 -> 18740 (-3.66 %)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>
This commit is contained in:
Rhys Perry
2019-12-11 16:10:26 +00:00
committed by Marge Bot
parent 92ace0bb31
commit f92a89a979
@@ -2818,8 +2818,11 @@ void load_lds(isel_context *ctx, unsigned elem_size_bytes, Temp dst,
return;
}
if (dst.type() == RegType::sgpr)
res = bld.as_uniform(res);
if (dst.type() == RegType::sgpr) {
Temp new_res = bld.tmp(RegType::sgpr, res.size());
expand_vector(ctx, res, new_res, res.size(), (1 << res.size()) - 1);
res = new_res;
}
if (num_elements == 1) {
result[result_size++] = res;