rol/ror IR support question

Hi all,

Is it planned to add support of rotations to IR?

Thanks,

Aleksey Zasenko

Hi Aleksey,

Rotations are not first-level constructs in the IR, but they can be expressed as a combination of shifts, ands and ors.

The general principle in LLVM is to have a simple basic set of instructions that can be combined to produce higher level functions; in the case of rotate, there are several places in LLVM that detect rotation idioms and optimize them, and they will be selected correctly in the backend to optimized instructions if they are available in the target architecture.

Cheers,

James

Hi James,

Thanks a lot for you answer!

Best regards,

Aleksey