<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPhone</div><div><br>On Jul 19, 2015, at 10:55 AM, Pete Cooper <<a href="mailto:peter_cooper@apple.com">peter_cooper@apple.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 19, 2015, at 10:45 AM, Arnold <<a href="mailto:aschwaighofer@apple.com" class="">aschwaighofer@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Given that we can call function pointers it seems to make sense to me to require to have (especially ABI changing) parameter attributes on the call site.</div></div></div></blockquote>Absolutely.</div><div><br class=""></div><div>I think the problem is that because you don’t know if everyone querying the call attributes will use paramHasAttr or getAttributes().hasAttribute(), you have to defensively apply everything to the call inst, even if its also on the Function*.</div><div><br class=""></div></div></blockquote><div><br></div>Some clients might want the numeric values of the attribute (e.g MergeFunctions) - querying for the presence only to get the value seems an unnecessary indirection  -that's why I suggested doing it at the getAttributes layer. As you correctly point out such union has to make semantic sense.<div><br><blockquote type="cite"><div><div>But saying that, it works to have them on the call, so not sure if this is really that much of a problem.</div><div><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">If that is not the case - that this is a requirement - and my interpretation of the langref is wrong - then the callinst's getattributes function should build the union of the callinst's attributes and the called function's attributes if available.</div></div></div></blockquote>It probably should be the union, probably.  There would be cases where thats legal, and cases where it isn’t, depending on what the call attributes are vs the function attributes.  Imagine zext on the call return vs sext on the function return for example.  I would say thats illegal.</div><div><br class=""></div><div>One solution is to say that the call attributes are required to be the superset of the function.  The verifier could check that if we want it to.</div></div></blockquote><div><br></div>Yes - the union has to make semantic sense.<div><br><blockquote type="cite"><div><div><div>Pete</div><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class="">Sent from my iPhone</div><div class=""><br class="">On Jul 19, 2015, at 10:00 AM, Pete Cooper <<a href="mailto:peter_cooper@apple.com" class="">peter_cooper@apple.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 19, 2015, at 7:38 AM, Arnold <<a href="mailto:aschwaighofer@apple.com" class="">aschwaighofer@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">I am not sure what you are asking?</div><div class=""><br class=""></div><div class="">Without transferring the attributes the call site will have no parameter attributes (of the callee functions).</div></div></div></blockquote>This doesn’t surprise me.<br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">My reading of the LangRef is that this should not be:</div><div class=""><ol class="arabic" style="list-style-position: initial; list-style-image: initial;"><li class=""><div style="margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; margin-top: 0px !important;" class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">‘<tt class="literal docutils"><span class="pre">function</span> <span class="pre">args</span></tt>‘: argument list whose types match the function signature argument types and parameter attributes.</span></div></li></ol></div><div class="">Specifically, if the sret attribute (on some target it changes the abi) attribute is not applied to call sites) I have cases that fail after running this pass.<br class=""><br class=""></div></div></div></blockquote>The trouble with call site attributes is that not everyone calls methods like this one to query the call attributes:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">bool</span> <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">CallInst</span>::paramHasAttr(<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">unsigned</span> i, <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">Attribute</span>::<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">AttrKind</span> A) <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">const</span> {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">  </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span><span style="" class=""> (</span>AttributeList<span style="" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">hasAttribute</span><span style="" class="">(i, A))</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="" class="">    </span>return<span style="" class=""> </span>true<span style="" class="">;</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93);" class=""><span style="" class="">  </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span><span style="" class=""> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">const</span><span style="" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">Function</span><span style="" class=""> *F = </span>getCalledFunction<span style="" class="">())</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93);" class=""><span style="" class="">    </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span><span style="" class=""> F-></span>getAttributes<span style="" class="">().</span>hasAttribute<span style="" class="">(i, A);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="" class="">  </span>return<span style="" class=""> </span>false<span style="" class="">;</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">}</div></div><div class=""><br class=""></div><div class="">Notice that it queries both the call site and the function attributes.  So if someone adds and attribute to the call instruction you’ll see it here.</div><div class=""><br class=""></div><div class="">However, if someone added an attribute to the Function* itself, then the call attributes are not updated.  And so queries such as this one are not actually looking at the function attributes at all:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class=""><span style="color: rgb(187, 44, 162);" class="">bool</span> <span style="color: rgb(79, 129, 135);" class="">DAE</span>::RemoveDeadStuffFromFunction(<span style="color: rgb(79, 129, 135);" class="">Function</span> *F) {</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">…</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class=""><span style="color: rgb(79, 129, 135);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>CallSite</span> CS(F-><span style="color: rgb(49, 89, 93);" class="">user_back</span>());</div><div style="margin: 0px;" class="">   <span class="Apple-tab-span" style="white-space: pre;">     </span><span style="color: rgb(79, 129, 135);" class="">Instruction</span> *Call = CS.<span style="color: rgb(49, 89, 93);" class="">getInstruction</span>();</div><div style="margin: 0px;" class=""><span class="Apple-tab-span" style="white-space: pre;">      </span><span style="color: rgb(187, 44, 162);" class="">const</span> <span style="color: rgb(79, 129, 135);" class="">AttributeSet</span> &CallPAL = CS.<span style="color: rgb(49, 89, 93);" class="">getAttributes</span>();</div><div style="margin: 0px;" class=""><div style="margin: 0px;" class=""><span style="color: rgb(187, 44, 162);" class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>if</span> (CallPAL.hasAttributes(i + <span style="color: rgb(39, 42, 216);" class="">1</span>)) {</div><div style="margin: 0px;" class="">          AttrBuilder B(CallPAL, i + <span style="color: rgb(39, 42, 216);" class="">1</span>);</div><div style="margin: 0px; color: rgb(0, 132, 0);" class=""><span style="" class="">          </span>// If the return type has changed, then get rid of 'returned' on the</div><div style="margin: 0px; color: rgb(0, 132, 0);" class=""><span style="" class="">          </span>// call site. The alternative is to make all 'returned' attributes on</div><div style="margin: 0px; color: rgb(0, 132, 0);" class=""><span style="" class="">          </span>// call sites keep the return value alive just like 'returned'</div><div style="margin: 0px; color: rgb(0, 132, 0);" class=""><span style="" class="">          </span>// attributes on function declaration but it's less clearly a win</div><div style="margin: 0px; color: rgb(0, 132, 0);" class=""><span style="" class="">          </span>// and this is not an expected case anyway</div><div style="margin: 0px;" class="">          <span style="color: rgb(187, 44, 162);" class="">if</span> (NRetTy != RetTy && B.contains(Attribute::Returned))</div><div style="margin: 0px;" class="">            B.removeAttribute(Attribute::Returned);</div><div style="margin: 0px;" class="">          AttributesVec.</div><div style="margin: 0px;" class="">            push_back(AttributeSet::get(F->getContext(), Args.size(), B));</div><div style="margin: 0px;" class="">        }</div><div class=""><br class=""></div></div></div></div></div><div class=""><br class=""></div><div class="">Personally I think the problem is that its even possible to do CallInst::getAttributes().  That leads to users accessing the attributes directly, possibly unaware that it doesn’t check the function attributes in that case.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Pete</div><div class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="">Sent from my iPhone</div><div class=""><br class="">On Jul 18, 2015, at 8:45 PM, Nick Lewycky <<a href="mailto:nicholas@mxc.ca" class="">nicholas@mxc.ca</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><span class="">Arnold Schwaighofer wrote:</span><br class=""><blockquote type="cite" class=""><span class="">Author: arnolds</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Date: Fri Jul 17 13:59:08 2015</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">New Revision: 242558</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D242558-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=DPCjTli64sYglbnTnKC7MvdjwE6U5MSXljsFzmbuDcI&s=AU3JkYwjgEN23h8zeuGg2xvw_Pd_urPbuK__Q1zpI1o&e=" class="">http://llvm.org/viewvc/llvm-project?rev=242558&view=rev</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Log:</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">MergeFuncs: Transfer the function parameter attributes to the call site</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class=""><a href="rdar://21516488" class="">rdar://21516488</a></span><br class=""></blockquote><span class=""></span><br class=""><span class="">This doesn't make sense. I don't see any way that the call instruction gets any attributes that aren't already present on the callee function. Can you add a testcase where that isn't true?</span><br class=""><span class=""></span><br class=""><span class="">Nick</span><br class=""><span class=""></span><br class=""><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Added:</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">     llvm/trunk/test/Transforms/MergeFunc/apply_function_attributes.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Modified:</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">     llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">     llvm/trunk/test/Transforms/MergeFunc/inttoptr-address-space.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">     llvm/trunk/test/Transforms/MergeFunc/inttoptr.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Transforms_IPO_MergeFunctions.cpp-3Frev-3D242558-26r1-3D242557-26r2-3D242558-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=DPCjTli64sYglbnTnKC7MvdjwE6U5MSXljsFzmbuDcI&s=0hHQ64Km6Zc5uC4vIBmQq0tUWM0hFX9WbzYZO6mS9pQ&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=242558&r1=242557&r2=242558&view=diff</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">==============================================================================</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Fri Jul 17 13:59:08 2015</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">@@ -1361,6 +1361,7 @@ void MergeFunctions::writeThunk(Function</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    CallInst *CI = Builder.CreateCall(F, Args);</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    CI->setTailCall();</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    CI->setCallingConv(F->getCallingConv());</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  CI->setAttributes(F->getAttributes());</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    if (NewG->getReturnType()->isVoidTy()) {</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">      Builder.CreateRetVoid();</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    } else {</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Added: llvm/trunk/test/Transforms/MergeFunc/apply_function_attributes.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_Transforms_MergeFunc_apply-5Ffunction-5Fattributes.ll-3Frev-3D242558-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=DPCjTli64sYglbnTnKC7MvdjwE6U5MSXljsFzmbuDcI&s=oDyFKdPX-IJxjHbcYQt2q4s1WX6KAWrsmnOAsKRZwss&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/MergeFunc/apply_function_attributes.ll?rev=242558&view=auto</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">==============================================================================</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">--- llvm/trunk/test/Transforms/MergeFunc/apply_function_attributes.ll (added)</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+++ llvm/trunk/test/Transforms/MergeFunc/apply_function_attributes.ll Fri Jul 17 13:59:08 2015</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">@@ -0,0 +1,22 @@</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; RUN: opt -S -mergefunc<  %s | FileCheck %s</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+%Si = type<{ i32 }></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+define void @sum(%Si* noalias sret %a, i32 %x, i32 %y) {</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum = add i32 %x, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum2 = add i32 %sum, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum3 = add i32 %sum2, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  ret void</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+}</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+define void @add(%Si* noalias sret %a, i32 %x, i32 %y) {</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum = add i32 %x, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum2 = add i32 %sum, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  %sum3 = add i32 %sum2, %y</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+  ret void</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+}</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; Make sure we transfer the parameter attributes to the call site.</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; CHECK-LABEL: define void @sum(%Si* noalias sret, i32, i32)</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; CHECK: tail call void @add(%Si* noalias sret %{{.*}}, i32 %{{.*}}, i32 %{{.*}})</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; CHECK: ret void</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Modified: llvm/trunk/test/Transforms/MergeFunc/inttoptr-address-space.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_Transforms_MergeFunc_inttoptr-2Daddress-2Dspace.ll-3Frev-3D242558-26r1-3D242557-26r2-3D242558-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=DPCjTli64sYglbnTnKC7MvdjwE6U5MSXljsFzmbuDcI&s=grRo64gg6cEddLXKnGXBJMC_64FfYrkO5rYJUbAZFMw&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/MergeFunc/inttoptr-address-space.ll?rev=242558&r1=242557&r2=242558&view=diff</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">==============================================================================</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">--- llvm/trunk/test/Transforms/MergeFunc/inttoptr-address-space.ll (original)</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+++ llvm/trunk/test/Transforms/MergeFunc/inttoptr-address-space.ll Fri Jul 17 13:59:08 2015</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">@@ -21,7 +21,7 @@ define internal i8* @func35(%.qux.2585 a</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  bb:</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK-LABEL: @func35(</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK: %[[V2:.+]] = bitcast %.qux.2585 addrspace(1)* %{{.*}} to %.qux.2496 addrspace(1)*</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">-; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496 addrspace(1)* %[[V2]])</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496 addrspace(1)* nocapture %[[V2]])</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    %tmp = getelementptr inbounds %.qux.2585, %.qux.2585 addrspace(1)* %this, i32 0, i32 2</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    %tmp1 = load i8*, i8* addrspace(1)* %tmp, align 4</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Modified: llvm/trunk/test/Transforms/MergeFunc/inttoptr.ll</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_Transforms_MergeFunc_inttoptr.ll-3Frev-3D242558-26r1-3D242557-26r2-3D242558-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=DPCjTli64sYglbnTnKC7MvdjwE6U5MSXljsFzmbuDcI&s=lsJYKtLqvqAdKntbddF14cNqHGmPl4WbOPQB3D4SkMA&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/MergeFunc/inttoptr.ll?rev=242558&r1=242557&r2=242558&view=diff</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">==============================================================================</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">--- llvm/trunk/test/Transforms/MergeFunc/inttoptr.ll (original)</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+++ llvm/trunk/test/Transforms/MergeFunc/inttoptr.ll Fri Jul 17 13:59:08 2015</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">@@ -48,7 +48,7 @@ define internal i8* @func35(%.qux.2585*</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  bb:</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK-LABEL: @func35(</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK: %[[V2:.+]] = bitcast %.qux.2585* %{{.*}} to %.qux.2496*</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">-; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496* %[[V2]])</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">+; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496* nocapture %[[V2]])</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">  ; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    %tmp = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0, i32 2</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">    %tmp1 = load i8*, i8** %tmp, align 4</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">_______________________________________________</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">llvm-commits mailing list</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><span class=""></span><br class=""></div></blockquote></div>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></blockquote></div></div></body></html>