division/modulus optimization

Almost all decent C compilers out there convert the following code into a single division/modulo operation…

int a, b, c, d;

b = c / d;

a = c % d;

Is this the same case for device functions as well?