<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 15 (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:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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:"Book Antiqua",serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-IE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:black;mso-fareast-language:EN-US'>Thanks Richard, I’ll do that - and I can add it as a bug.  It’s almost certainly easy enough to fix, but I wanted to be sure that I wasn’t just making a naïve mistake.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:black;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:black;mso-fareast-language:EN-US'>            MartinO<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;color:black;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Richard Smith [mailto:richard@metafoo.co.uk] <br><b>Sent:</b> 01 March 2018 17:44<br><b>To:</b> Martin J. O'Riordan <MartinO@theheart.ie><br><b>Cc:</b> Clang Dev <cfe-dev@lists.llvm.org><br><b>Subject:</b> Re: [cfe-dev] Disabling vectorisation at '-O3'<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>On 1 Mar 2018 09:16, "Martin J. O'Riordan via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>Hi CFE-Devs,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>While debugging a problem in our back-end, I want to temporarily remove JUST ‘</span><span style='font-family:"Courier New"'>-vectorize</span><span style='font-family:"Book Antiqua",serif'>’ and ‘</span><span style='font-family:"Courier New"'>-vectorize-slp</span><span style='font-family:"Book Antiqua",serif'>’ from the flags passed with ‘</span><span style='font-family:"Courier New"'>-cc1</span><span style='font-family:"Book Antiqua",serif'>’, but I want to leave all the other command-line options the same.  But when I use:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt'><span style='font-family:"Courier New"'>clang -S -O3 -fno-vectorize -fno-slp-vectorize foo.c</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>it is still inserting ‘</span><span style='font-family:"Courier New"'>-vectorize -vectorize-slp</span><span style='font-family:"Book Antiqua",serif'>’.  The code in ‘</span><span style='font-family:"Courier New"'>Clang.cpp</span><span style='font-family:"Book Antiqua",serif'>’ for this is at line #4858 (on the v6.0 branch):</span><o:p></o:p></p></div></div></blockquote></div></div><div><p class=MsoNormal>This looks like a bug to me; I'd expect -fno-* to override the -O flag rather than meaning "use the default for this -O level". I'd suggest you look up who added these flags and check with them to make sure this wasn't the intent (it it was, we'll need further discussion), then fix the driver to do the "obvious" thing.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>