i965: Don't treat IF or WHILE with cmod as writing the flag.
Sandybridge's IF and WHILE instructions can do an embedded comparison with conditional mod. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -933,7 +933,9 @@ fs_inst::reads_flag() const
|
||||
bool
|
||||
fs_inst::writes_flag() const
|
||||
{
|
||||
return (conditional_mod && opcode != BRW_OPCODE_SEL) ||
|
||||
return (conditional_mod && (opcode != BRW_OPCODE_SEL &&
|
||||
opcode != BRW_OPCODE_IF &&
|
||||
opcode != BRW_OPCODE_WHILE)) ||
|
||||
opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS;
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,9 @@ public:
|
||||
|
||||
bool writes_flag()
|
||||
{
|
||||
return conditional_mod && opcode != BRW_OPCODE_SEL;
|
||||
return (conditional_mod && (opcode != BRW_OPCODE_SEL &&
|
||||
opcode != BRW_OPCODE_IF &&
|
||||
opcode != BRW_OPCODE_WHILE));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user