We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was testing a few things and noticed this. the _x variable is not used here so it shouldn't be compiled. (target AVX2)
_x
uint8 test(uniform uint8<TARGET_WIDTH> x) { uint8 _x; unmasked { _x = x[programIndex]+1; } return x[programIndex]+1; }
test___unT_3C_8_3E_: # @test___unT_3C_8_3E_ vmovmskps eax, ymm1 cmp eax, 255 je .LBB1_2 not al test al, -127 .LBB1_2: vpcmpeqd xmm1, xmm1, xmm1 vpsubb xmm0, xmm0, xmm1 vzeroupper ret
by removing the redundant part:
uint8 test(uniform uint8<TARGET_WIDTH> x) { return x[programIndex]+1; }
test___unT_3C_8_3E_: # @test___unT_3C_8_3E_ vpcmpeqd xmm1, xmm1, xmm1 vpsubb xmm0, xmm0, xmm1 ret
I'm not sure what those extra instructions do, looks redundant to me.
The text was updated successfully, but these errors were encountered:
Yes, indeed. I think that unmasked region doesn't matter here. The following code also produces similar redundancy
unmasked
uint8 test(uniform uint8<TARGET_WIDTH> x) { uint8 y = x[0]; return x[programIndex]+1; }
Sorry, something went wrong.
I would experiment with SimplifyCFG and DCE to see if they are able to solve the problem and if they trigger in the right place in the opt pipeline.
SimplifyCFG
No branches or pull requests
I was testing a few things and noticed this. the
_x
variable is not used here so it shouldn't be compiled. (target AVX2)by removing the redundant part:
I'm not sure what those extra instructions do, looks redundant to me.
The text was updated successfully, but these errors were encountered: