diff options
author | Rob Clark <[email protected]> | 2016-04-04 17:34:57 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-04-04 20:18:18 -0400 |
commit | 8e451c2d06d18ee54dc3098b3987af6e0bc59f5e (patch) | |
tree | c6f6158b75740c033f9e4cb04a2ae6210d057176 /src/gallium/drivers/freedreno | |
parent | 383b6e87f90e0ac84a200e1677a44b370976c93b (diff) |
freedreno/ir3: don't cp into phi's
The block defining a phi source might not have been executed. If we
allow copy propagation, we could end up pointing to a src instruction in
the wrong block.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cp.c b/src/gallium/drivers/freedreno/ir3/ir3_cp.c index 00fa3538cc0..f032f0bd53f 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cp.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cp.c @@ -230,6 +230,12 @@ reg_cp(struct ir3_instruction *instr, struct ir3_register *reg, unsigned n) { struct ir3_instruction *src = ssa(reg); + /* don't propagate copies into a PHI, since we don't know if the + * src block executed: + */ + if (instr->opc == OPC_META_PHI) + return; + if (is_eligible_mov(src, true)) { /* simple case, no immed/const/relativ, only mov's w/ ssa src: */ struct ir3_register *src_reg = src->regs[1]; |