<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Daniel<div class=""><br class=""></div><div class="">Thanks for the excellent breakdown of whats going on here.</div><div class=""><br class=""></div><div class="">Earlier in the thread on this I made this comment:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">"The first thing that springs to mind is that I don’t trust the backend to get this right.  I don’t think it will understand when an i32 load/store would have been preferable to a float one or vice versa.  I have no evidence of this, but given how strongly typed tablegen is, I don’t think it can make a good choice here.</div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">So I think we probably need to teach the backend how to undo whatever canonical form we choose if it has a reason to”</div></div></blockquote><div class=""><br class=""></div>Without seeing the machine instructions, its hard to be 100% certain, but the case you’ve found may be simple enough that the backend can actually fix this. However, such a fixup would be quite target specific (such a target would need different register classes for integers and doubles in this case), and we’d need such a pass for all targets which isn’t ideal.<div class=""><br class=""></div><div class="">So i wouldn’t rule out a backend solution, but i have a preference for your suggestion to improve SROA.</div><div class=""><br class=""></div><div class="">In this particular case, it makes sense for SROA to do effectively the same analysis InstCombine did here and work out when a load is just raw data vs when its data is used as a specific type.  The relevant piece of InstCombine is this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">// Try to canonicalize loads which are only ever stored to operate over</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  </span>// integers instead of any other type. We only do this when the loaded type</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  </span>// is sized and has a size exactly the same as its store size and the store</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  </span>// size is a legal integer type.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">  <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (!Ty-><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">isIntegerTy</span>() && Ty-><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">isSized</span>() &&</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(49, 89, 93);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">      DL.</span>isLegalInteger<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(DL.</span>getTypeStoreSizeInBits<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(Ty)) &&</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(49, 89, 93);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">      DL.</span>getTypeStoreSizeInBits<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(Ty) == DL.</span>getTypeSizeInBits<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(Ty)) {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">std</span>::<span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">all_of</span>(LI.<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">user_begin</span>(), LI.<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">user_end</span>(), [&LI](<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">User</span> *U) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">          <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">auto</span> *SI = <span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">dyn_cast</span><<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">StoreInst</span>>(U);</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">          <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span> SI && SI-><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">getPointerOperand</span>() != &LI;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        })) {</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">...</div><div class=""><br class=""></div><div class="">After ignoring load/stores which satisfy something like the above code, you can always fallback to the current code of choosing an integer type, so in the common case there won’t be any behavior difference.</div><div class=""><br class=""></div><div class="">Cheers</div><div class="">Pete<br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Apr 21, 2015, at 9:18 AM, Daniel Stewart <<a href="mailto:stewartd@codeaurora.org" class="">stewartd@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">So this change did indeed have an effect!<span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);" class="">J</span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I’m seeing regressions in a number of benchmarks mainly due to a host of extra bitcasts that get introduced. Here’s the problem I’m seeing in a nutshell:<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">1)      There is a Phi with input type double<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">2)      Polly demotes the phi into a load/store of type double<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">3)      InstCombine canonicalizes the load/store to use i64 instead of double<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">4)      SROA removes the load/store & inserts a phi back in, using i64 as the type. Inserts bitcast to get to double.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">5)      The bitcast sticks around and eventually get translated into FMOVs (for AArch64 at least).<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">The function findCommonType() in SROA.cpp is used to obtain the type that should be used for the new alloca that SROA wants to create. It’s decision process is essentially – if all loads/stores of alloca are the same, use that type; else use the corresponding integer type. This causes bitcasts to be inserted in a number of places, most all of which stick around.<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I’ve copied a reduced version of an instance of the problem below. I’m looking for comments on what others think is the right solution here. Make SROA more intelligent about picking the type?<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">The code is below with all unnecessary code removed for easy consumption.<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Daniel<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">Before<span class="Apple-converted-space"> </span></span></u><u class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(33, 33, 33);" class="">Polly – Prepare code for polly</span></u><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><span class="Apple-converted-space"> </span>we have code that looks like:</span></u><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.cond473:                                    ; preds = %while.cond473.outer78, %while.body475<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= phi double [<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%105</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">, %while.body475 ], [ %p_j_x452.0.ph82, %while.cond473.outer78 ]<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.body475:                                    ; preds = %while.cond473<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %sub480 = fsub fast double %64,<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%105</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load double* %x485, align 8, !tbaa !25<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">After<span class="Apple-converted-space"> </span></span></u><u class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(33, 33, 33);" class="">Polly – Prepare code for polly</span></u><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><span class="Apple-converted-space"> </span>we have:</span></u><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.cond473:                                    ; preds = %while.cond473.outer78, %while.body475<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0.reload</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load double* %p_j_x452.0.reg2mem<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.body475:                                    ; preds = %while.cond473<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %sub480 = fsub fast double %64,<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0.reload</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%110</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load double* %x485, align 8, !tbaa !25<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  store double<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%110</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">, double* %p_j_x452.0.reg2mem<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">After<span class="Apple-converted-space"> </span></span></u><u class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(33, 33, 33);" class="">Combine redundant instructions</span></u><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><span class="Apple-converted-space"> </span>:</span></u><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.cond473:                                    ; preds = %while.cond473.outer78, %while.body475<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0.reload</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load double* %p_j_x452.0.reg2mem, align 8<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.body475:                                    ; preds = %while.cond473<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %sub480 = fsub fast double %74,<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%p_j_x452.0.reload</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %x485 = getelementptr inbounds %struct.CompAtom* %15, i64 %idxprom482, i32 0, i32 0<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %194 = bitcast double* %x485 to i64*<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%195</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load i64* %194, align 8, !tbaa !25<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %200 = bitcast double* %p_j_x452.0.reg2mem to i64*<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  store i64<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%195</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">, i64* %200, align 8<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">After<span class="Apple-converted-space"> </span></span></u><u class=""><span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(33, 33, 33);" class="">SROA</span></u><u class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><span class="Apple-converted-space"> </span>:</span></u><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.cond473:                                    ; preds = %while.cond473.outer78, %while.body475<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %p_j_x452.0.reg2mem.sroa.0.0.p_j_x452.0.reload362 = phi i64 [ %p_j_x452.0.ph73.reg2mem.sroa.0.0.load368, %while.cond473.outer78 ], [<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%178</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">, %while.body475 ]<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%173</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= bitcast i64 %p_j_x452.0.reg2mem.sroa.0.0.p_j_x452.0.reload362 to double<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">while.body475:                                    ; preds = %while.cond473<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %sub480 = fsub fast double %78,<span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 112, 192);" class="">%173</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %x485 = getelementptr inbounds %struct.CompAtom* %15, i64 %idxprom482, i32 0, i32 0<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">  %177 = bitcast double* %x485 to i64*<o:p class=""></o:p></span></div><div style="border-style: none none solid; border-bottom-color: windowtext; border-bottom-width: 1pt; padding: 0in 0in 1pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; border: none; padding: 0in;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> <span class="Apple-converted-space"> </span></span><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class="">%178</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class="">= load i64* %177, align 8, !tbaa !25<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; border: none; padding: 0in;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);" class=""> </span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span><a href="mailto:llvmdev-bounces@cs.uiuc.edu" style="color: purple; text-decoration: underline;" class="">llvmdev-bounces@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>[<a href="mailto:llvmdev-bounces@cs.uiuc.edu" style="color: purple; text-decoration: underline;" class="">mailto:llvmdev-bounces@cs.uiuc.edu</a>]<span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>Chandler Carruth<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, January 21, 2015 8:32 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Pete Cooper<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>LLVM Developers Mailing List<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [LLVMdev] RFC: Missing canonicalization in LLVM<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Wed, Jan 21, 2015 at 3:06 PM, Pete Cooper <<a href="mailto:peter_cooper@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">peter_cooper@apple.com</a>> wrote:<o:p class=""></o:p></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0in 0in 0in 6pt; margin: 5pt 0in 5pt 4.8pt;" class="" type="cite"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Sounds good to me.  Integers it is then.<o:p class=""></o:p></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><br class="">FYI, thanks, I'm just going to commit this then. It seems we're all in essential agreement. We can revert it and take a more cautious approach if something terrible happens. =]</div></div></div></div></div></blockquote></div><br class=""></div></div></body></html>