[PATCH vkd3d v8 2/4] vkd3d-shader/hlsl: Handle conditionals in copy propagation.
Zebediah Figura
zfigura at codeweavers.com
Tue Nov 30 12:10:37 CST 2021
So this is failing to optimize the following program, and I can't see why:
uniform int i;
float main() : sv_target
{
float x = 0;
if (0){}
return x;
}
It generates the following code:
2: float | 0.00000000e+00
3: | = (x.x @2)
4: int | 0
5: | if (@4) {
} else {
}
6: float | x
7: | = (<retval-0x5620633a6280>.x @6)
8: | return
9: uint | 0
10: float | <retval-0x5620633a6280>[@9]
11: | = (<output-sv_target0>.x @10)
I'd expect @6 to be rewritten to @2.x, but that doesn't happen. Do you
know why?
More information about the wine-devel
mailing list