pan/bi: Allow CSE of preloaded registers
Needed to CSE `LEA_VARY` in varying shaders on Valhall. No shader-db changes on Bifrost. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>
This commit is contained in:
committed by
Marge Bot
parent
3154df232b
commit
600f689a98
@@ -139,9 +139,12 @@ instr_can_cse(const bi_instr *I)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Similar refuse to CSE non-SSA sources */
|
||||
/* Similar refuse to CSE non-SSA sources. We allow machine registers,
|
||||
* since CSE runs before register allocation which means any registers
|
||||
* encountered are preloaded and hence assumed constant.
|
||||
*/
|
||||
bi_foreach_src(I, s) {
|
||||
if (I->src[s].reg || I->src[s].type == BI_INDEX_REGISTER)
|
||||
if (I->src[s].reg)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user