<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>To give a bit of motivation for the proposed patch, here is an example on how it can be used.</div><div><br></div><div>Consider the attached motivation.ll file.</div><div>Compile it using thumb with swift cpu, i.e.,</div><div>llc -march thumb motivation.ll -o - -mcpu=swift  -O3</div><div><br></div><div>The produced output will be similar to attached current.s.</div><div><br></div><div>As you may have noticed, the produced code is really different between the two functions of motivation.ll file, whereas the input code is very similar. In fact, I would have expected for the second function, the same code as the first function plus a AND instruction, i.e., like attached expected.s.</div><div><br></div><div>Using the hook proposed in the previous patch, one can achieve the expected output with the attached earlyDAGCombineARMExample.patch.</div><div><br></div><div>Note: My point is to illustrate the motivation of my previous patch and get reviews for it. Do not spend time reviewing the earlyDAGCombineARMExample.patch, it is not intended to be committed (at least in that thread :)).</div><div><br></div><div>Thanks,</div><div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-Quentin</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "></div></div></div></body></html>