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:
Matt Turner
2014-11-11 15:56:58 -08:00
parent 937ddb419d
commit f1e5418f40
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -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;
}
+3 -1
View File
@@ -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));
}
};