r600g/sb: fix handling of new multislot instructions on cayman

Ex-scalar instructions that became multislot on cayman do replicate result
to all channels - handle them similar to DOT4.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
This commit is contained in:
Vadim Girlin
2013-07-16 12:28:52 +04:00
parent 033eec4145
commit ba7fa4c4c9
3 changed files with 6 additions and 5 deletions
+1 -3
View File
@@ -51,7 +51,7 @@ bool alu_packed_node::accept(vpass& p, bool enter) {
return p.visit(*this, enter);
}
void alu_packed_node::init_args() {
void alu_packed_node::init_args(bool repl) {
alu_node *p = static_cast<alu_node*>(first);
assert(p->is_valid());
while (p) {
@@ -60,8 +60,6 @@ void alu_packed_node::init_args() {
p = static_cast<alu_node*>(p->next);
}
// if it's packed then it's always multislot, no need to check slot flags
bool repl = (op_ptr()->flags & AF_REPL);
value *replicated_value = NULL;
for (vvec::iterator I = dst.begin(), E = dst.end(); I != E; ++I) {
+1 -1
View File
@@ -1014,7 +1014,7 @@ public:
return static_cast<alu_node*>(first)->bc.op_ptr;
}
unsigned op() { return static_cast<alu_node*>(first)->bc.op; }
void init_args();
void init_args(bool repl);
virtual bool is_valid() { return subtype == NST_ALU_PACKED_INST; }
virtual bool accept(vpass &p, bool enter);
@@ -218,7 +218,10 @@ bool ssa_rename::visit(alu_packed_node& n, bool enter) {
I->accept(*this, false);
}
n.init_args();
bool repl = (n.op_ptr()->flags & AF_REPL) ||
(ctx.is_cayman() && (n.first->alu_op_slot_flags() & AF_S));
n.init_args(repl);
}
return false;
}