Pushed, thanks.
On Tue, Nov 05, 2013 at 01:55:23PM +0800, Lu Guanqun wrote: > From: Yang Rong <[email protected]> > > Signed-off-by: Yang Rong <[email protected]> > Tested-by: Lu Guanqun <[email protected]> > Reviewed-by: Lu Guanqun <[email protected]> > --- > backend/src/ir/lowering.cpp | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/backend/src/ir/lowering.cpp b/backend/src/ir/lowering.cpp > index 6cccaf5..013878c 100644 > --- a/backend/src/ir/lowering.cpp > +++ b/backend/src/ir/lowering.cpp > @@ -233,8 +233,14 @@ namespace ir { > const PushLocation argLocation(*fn, loadAddImm.argID, offset); > if (inserted.contains(argLocation)) > continue; > + Register pushed; > const Register reg = load->getValue(valueID); > - const Register pushed = fn->newRegister(family); > + if (offset != 0) { > + pushed = fn->newRegister(family); > + this->appendPushedConstant(pushed, argLocation); > + } else { > + pushed = fn->getArg(loadAddImm.argID).reg; > + } > > // TODO the MOV instruction can be most of the time avoided if the > // register is never written. We must however support the register > @@ -243,7 +249,6 @@ namespace ir { > const Instruction mov = ir::MOV(type, reg, pushed); > mov.replace(load); > dead.insert(load); > - this->appendPushedConstant(pushed, argLocation); > } > } > > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
