Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i965/fs: fix copy-propagation with suboffset from constants
The current code ignores the suboffet in the instruction's source and just uses the one from the constant. This is not correct when the instruction's source is accessing the constant with a different type and using the suboffset to select a specific chunk of the constant. We generate this kind of code in fp64 when we want to select only the high 32-bit of a particular double constant. Instead, we should add any existing suboffset in the instruction's source (modulo the size of the entry's type) to the suboffset in the constant so we can preserve the orinal semantics. Prevents that we turn this: mov(8) vgrf5:DF, u2<0>:DF mov(8) vgrf7:UD, vgrf5+0.4<2>:UD Into: mov(8) vgrf7:UD, u2<0>:UD And instead, with this patch, we produce: mov(8) vgrf7:UD, u2+0.4<0>:UD
- Loading branch information