creating a loop in lowering code

The MSP430 only has 1-bit shifts. In the lowering code, I would like to create a small loop to do multiple bit shifts. I assume that I have to create a new basic block, and figure out the chain stuff.

Is there code in some backend, or generic lowering support, that does a similar thing? Could someone point me to it?

thanks,
bagel

Hello

The MSP430 only has 1-bit shifts. In the lowering code, I would like to create
a small loop to do multiple bit shifts. I assume that I have to create a new
basic block, and figure out the chain stuff.

This might be tricky in general. Why cannot you just emit a libcall?

It doesn't work exactly like that, but see the handling of ATOMICs on PPC.