Some psychonauts shaders do pow(abs(x), y), which generates mov vgrf10:F, |vgrf10|:F pow vgrf53:F, vgrf10:F, vgrf55:F We copy propagate from the MOV into the POW: mov vgrf10:F, |vgrf10|:F pow vgrf53:F, |vgrf10|:F, vgrf55:F but since vgrf10 is used after the MOV, dead code elimination isn't able to recognize that it's no longer used and so we can't remove it. We could probably handle this in copy-propagation. After copy-propagating a MOV x, (abs)x instruction we'd check if its value has been propagated into all uses of the MOV's destination, and if so remove the MOV.
(In reply to comment #0) > Some psychonauts shaders do pow(abs(x), y), which generates > > mov vgrf10:F, |vgrf10|:F > pow vgrf53:F, vgrf10:F, vgrf55:F > > We copy propagate from the MOV into the POW: > > mov vgrf10:F, |vgrf10|:F > pow vgrf53:F, |vgrf10|:F, vgrf55:F This is not happening for me. What I get is something like this: mov(8) g11<1>F (abs)g7<4,4,1>.xF math pow(8) g13<1>F g11<8,8,1>F g12<8,8,1>F This was on SNB... is abs copy propagation only happening for specific hardware generations?
Yes, since SNB can't do source modifiers on math instructions.
I think the register renaming pass has solved this.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.