<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>It appears Mr. Cheng may be busy, so perhaps someone here knows?</span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve been debugging a code generator bug that surfaced while trying to build tinyXML for ARM with LLVM 2.8.  The bug seems to originate in  DAGCombiner.  LLVM 2.9 still has this bug, but top of trunk does not.  To narrow down what change fixed it, I’ve used a binary search of revisions from 2.9 to top of trunk.  The bytecode compiles once I back ported r127440 to LLVM 2.8.  Hurray!  But I don’t understand why it fixes my bug.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’d love to know more.  Especially, I’d like to produce a C/C++ snippet which repros the problem on a small scale.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'>Your revision description indicates “<span style='font-size:8.5pt;font-family:"Courier New"'>Avoid replacing the value of a directly stored load with the stored value if the load is indexed. rdar://9117613.”<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve tried a variety of weird pointer manipulations like those found in tinyXML e.g. *p = *(p + 1), *(p+1) = *p.  But none of my attempts seem to get it to fail the way my input bytecode failed.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m trying to understand what 2011-03-10-DAGCombineCrash.ll is testing, and I don’t really fully read LLVM bytecode yet.  If it is possible, could you’d be so kind as to share a C/C++ snippet?  Or if you have the time, maybe share with me how the fix addresses the bug, and what the original bug was.  I don’t believe I have any visibility into rdar://9117613.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Attached is the bytecode which will break LLVM 2.8 – 2.9 with:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><pre>Stack dump:<o:p></o:p></pre><pre>0.      Program arguments: llc libtinyxml.so.bc<o:p></o:p></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>1.      Running pass 'Function Pass Manager' on module 'libtinyxml.so.bc'.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>2.      Running pass 'ARM Instruction Selection' on function<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>'@_ZN11PVTiXmlNode8IdentifyEPKc15PVTiXmlEncoding'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Program llc died with signal 6<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for your help!!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Joe Abbey<o:p></o:p></p><p class=MsoNormal>Software Architect<o:p></o:p></p><p class=MsoNormal>Arxan Technologies, Inc.<o:p></o:p></p><p class=MsoNormal>1305 Cumberland Ave, Ste 215<o:p></o:p></p><p class=MsoNormal>West Lafayette, IN 47906<o:p></o:p></p><p class=MsoNormal>W: 765-889-4756 x2<o:p></o:p></p><p class=MsoNormal>C: 765-464-9893<o:p></o:p></p><p class=MsoNormal><a href="mailto:jabbey@arxan.com">jabbey@arxan.com</a><o:p></o:p></p><p class=MsoNormal><a href="http://www.arxan.com/">www.arxan.com</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>