Skip to content
New issue

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

Bizarre code generated for a simple integer division, result computed is garbage. #13

Open
GoogleCodeExporter opened this issue Feb 7, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

For code in the kernel,

#define DIV 6
...
int row = blockIdx.x / DIV;

the following instructions are generated:

mul.hi.u32 %r11, %r1, -1431655765;
shr.u32 %r12, %r11, 2;


I have no clue what the compiler is doing here. But, there seems to be multiple 
problems in the DoMul code.

Original issue reported on code.google.com by Ken.Dom...@gmail.com on 12 Jun 2013 at 3:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant