<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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 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;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@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" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">Hi Chandler,</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">I think I have shortened the metadata as much as I could.  Out of 91 entries that I had in the original patch, I now have only 7.</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!38 = metadata !{i32 786688, null, metadata !"var2", null, i32 20, null, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [var2] [line 20]</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!48 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!49 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!50 = metadata !{metadata !"clang version 3.5 (202418)"}</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!60 = metadata !{i32 786689, null, metadata !"this", null, i32 16777216, null, i32 1088, null} ; [ DW_TAG_arg_variable ] [this] [line
 0]</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!62 = metadata !{i8* getelementptr inbounds ([1 x i8]* @.str, i64 0, i64 0)}</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!63 = metadata !{i32 786689, null, metadata !"value", null, i32 33554439, null, i32 0, null} ; [ DW_TAG_arg_variable ] [value] [line
 7]</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">If I understood you correctly, I should replace some of these entries with “metadata !{null}”. Is this what you meant?</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">The compiler is asserting if I substitute</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!63 = metadata !{i32 786689, null, metadata !"value", null, i32 33554439, null, i32 0, null} ; [ DW_TAG_arg_variable ] [value] [line
 7]</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">with</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!63 = metadata !{null} ;</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">The test started to pass (i.e. the same code generated at –O2 –g vs -O2), after I substituted</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!60 = metadata !{i32 786689, null, metadata !"this", null, i32 16777216, null, i32 1088, null} ; [ DW_TAG_arg_variable ] [this] [line
 0]</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">with</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">!60 = metadata !{null} ;</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">Replacing any of the 7 metadata entries with metadata !{null} ; either caused the test to produce the same code at –O2 –g/-O2 or caused
 the assertion failure. Please let me know if you meant to reduce the test in some other way.</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D"> </span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">Thanks!</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Segoe UI","sans-serif";color:#1F497D">Katya.</span><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><b><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"> </span></b><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> chandlerc@google.com [mailto:chandlerc@google.com]
<b>On Behalf Of </b>Chandler Carruth<br>
<b>Sent:</b> Thursday, March 13, 2014 5:02 PM<br>
<b>To:</b> reviews+D2970+public+de5bc9734a467b4e@llvm-reviews.chandlerc.com<br>
<b>Cc:</b> Chandler Carruth; Romanova, Katya; Commit Messages and Patches for LLVM<br>
<b>Subject:</b> Re: [PATCH] Branch folding causes different code generation at "-O2 -g" and "-O2"<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Mar 13, 2014 at 4:16 PM, Katya Romanova <<a href="mailto:Katya_Romanova@playstation.sony.com" target="_blank">Katya_Romanova@playstation.sony.com</a>> wrote:<o:p></o:p></p>
<div id=":74t">
<p class="MsoNormal">  Hi Chandler,<br>
  This bugfix is still sitting in my queue. Is it OK to commit?  If you are busy, maybe Eric could review?<br>
<br>
  I will make a small change to the testcase before I commit. I will add -mtriple-x86_64-linux to the RUN line.<br>
<br>
  Thank you!<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
Please minimize the test case according to this comment I made previously:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">I don't think we need a full debug-info test case here.<br>
Just put some stub debug_value calls into the test in the appropriate places with null metadata. It should still work just as well and won't require the full Clang-generated DWARF-structured debug info metadata.</span><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>