nv50/ir: copy joinAt when splitting both before and after
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 1 Jul 2015 06:11:39 +0000 (02:11 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 1 Jul 2015 06:50:43 +0000 (02:50 -0400)
commit5dcb28c3d26828ed1b0e2bd5a0589c5baab04b85
tree16abb746ced331cb2ab82752724b258ae93e563e
parent4caaa2681e727fa6405ff6de6d1f6c6a356ede34
nv50/ir: copy joinAt when splitting both before and after

The current implementation only moves the joinAt when splitting after
the given instruction, not before it. So if you have a BB with

  foo
  instr
  bar
  joinat

and thus with joinAt set, we end up first splitting before instr, at
which point the instr's bb is updated to the new bb. Since that bb
doesn't have a joinAt set (despite containing one), when splitting after
the instr, there is nothing to copy over. Since the joinat will be in
the "split" bb irrespective of whether we're splitting before or after
the instruction, move it over in either case.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91124
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp