mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
i965/fs: Fix off-by-one region overlap comparison in copy propagation.
This was introduced in cf375a3333 but
the blame is mine because the pseudocode I sent in my review comment
for the original patch suggesting to do things this way already had
the off-by-one error. This may have caused copy propagation to be
unnecessarily strict while checking whether VGRF writes interfere with
any ACP entries and possibly miss valid optimization opportunities in
cases where multiple copy instructions write sequential locations of
the same VGRF.
Cc: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
8f538d9ae0
commit
2db9dd5aeb
1 changed files with 2 additions and 2 deletions
|
|
@ -719,8 +719,8 @@ inline bool
|
|||
regions_overlap(const fs_reg &r, unsigned n, const fs_reg &s, unsigned m)
|
||||
{
|
||||
return r.file == s.file && r.nr == s.nr &&
|
||||
!(r.reg_offset + n < s.reg_offset ||
|
||||
s.reg_offset + m < r.reg_offset);
|
||||
!(r.reg_offset + n <= s.reg_offset ||
|
||||
s.reg_offset + m <= r.reg_offset);
|
||||
}
|
||||
|
||||
/* Walks a basic block and does copy propagation on it using the acp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue