I just noticed that the compiler does not see __mul24 with two literals as a multiplication and resolve it in the compilation phase, like 10*10, so it will actually issue instructions for it.
This is just something that catched me unaware, while switching macros for variables and the other while around. I noticed when I looked at the ptx output.
Also, a multiply with a fixed power of two (both using * and __mul24) doesn’t seem to be changed to a shift left automatically. Why not?