Shift operations for Backend target

Hello LLVM-Dev,

I am currently implementing the shift operations for our backend and noticed that there are no shift right/left with carry in the LLVM Language Reference Manual. Is this because it is safe to assume that the shift with carry instructions are only carried out when a shift instruction is expanded? If that is not the case, are there other reasons why there is no IR instruction equivalent for shift with carry instructions?

Thank you in advance for your help!


Miguel Inigo J. Manalac (1852)

The IR is intended to be a fairly minimal set of higher level operations which are easier for frontends and the optimizers to understand. Low level shift implementation details are only relevant in codegen. SelectionDAG defines SHL_PARTS/SRA_PARTS/SRL_PARTS to help with target shift legalization