<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 26, 2020, at 21:57, Miguel Inigo J. Manalac via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: "Meiryo UI", sans-serif;" class="">Hello LLVM-Dev,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: "Meiryo UI", sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: "Meiryo UI", sans-serif;" class="">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?</span></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>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 </div><div><br class=""></div><div>-Matt</div><blockquote type="cite" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: "Meiryo UI", sans-serif;" class=""><o:p class=""></o:p></span></div></div></blockquote></div></body></html>