<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">I noticed since this commit there is a test-suite failure:</p><p style="margin: 0px; line-height: normal; font-family: Helvetica;"><br></p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><a href="http://lab.llvm.org:8080/green/job/perf_darwin_x86_Osflto/64/">http://lab.llvm.org:8080/green/job/perf_darwin_x86_Osflto/64/</a></p><p style="margin: 0px; line-height: normal; font-family: Helvetica;"><br></p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">SingleSource.Benchmarks.Adobe-C++.loop_unroll appears to be failing.</p><p style="margin: 0px; line-height: normal; font-family: Helvetica;"><br></p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Tailing the output of the program gets:</p><p style="margin: 0px; line-height: normal; font-family: Helvetica;"><br></p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">…</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p><p style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">test 236 failed</p></div> <br> <div id="bloop_sign_1476214348332995840" class="bloop_sign"></div> <br><p class="airmail_on">On October 8, 2016 at 8:15:40 PM, Hal Finkel via cfe-commits (<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Author: hfinkel<br>Date: Sat Oct  8 22:06:31 2016<br>New Revision: 283685<br><br>URL: http://llvm.org/viewvc/llvm-project?rev=283685&view=rev<br>Log:<br>When optimizing for size, enable loop rerolling by default<br><br>We have a loop-rerolling optimization which can be enabled by using<br>-freroll-loops. While sometimes loops are hand-unrolled for performance<br>reasons, when optimizing for size, we should always undo this manual<br>optimization to produce smaller code (our optimizer's unroller will still<br>unroll the rerolled loops if it thinks that is a good idea).<br><br>Modified:<br>    cfe/trunk/lib/Driver/Tools.cpp<br>    cfe/trunk/test/Driver/clang_f_opts.c<br><br>Modified: cfe/trunk/lib/Driver/Tools.cpp<br>URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=283685&r1=283684&r2=283685&view=diff<br>==============================================================================<br>--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>+++ cfe/trunk/lib/Driver/Tools.cpp Sat Oct  8 22:06:31 2016<br>@@ -5227,9 +5227,18 @@ void Clang::ConstructJob(Compilation &C,<br>   }<br> <br>   if (Arg *A = Args.getLastArg(options::OPT_freroll_loops,<br>-                               options::OPT_fno_reroll_loops))<br>+                               options::OPT_fno_reroll_loops)) {<br>     if (A->getOption().matches(options::OPT_freroll_loops))<br>       CmdArgs.push_back("-freroll-loops");<br>+  } else if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {<br>+    // If rerolling is not explicitly enabled or disabled, then enable when<br>+    // optimizing for size.<br>+    if (A->getOption().matches(options::OPT_O)) {<br>+      StringRef S(A->getValue());<br>+      if (S == "s" || S == "z")<br>+        CmdArgs.push_back("-freroll-loops");<br>+    }<br>+  }<br> <br>   Args.AddLastArg(CmdArgs, options::OPT_fwritable_strings);<br>   Args.AddLastArg(CmdArgs, options::OPT_funroll_loops,<br><br>Modified: cfe/trunk/test/Driver/clang_f_opts.c<br>URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=283685&r1=283684&r2=283685&view=diff<br>==============================================================================<br>--- cfe/trunk/test/Driver/clang_f_opts.c (original)<br>+++ cfe/trunk/test/Driver/clang_f_opts.c Sat Oct  8 22:06:31 2016<br>@@ -47,7 +47,12 @@<br> // CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops"<br> <br> // RUN: %clang -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s<br>+// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s<br>+// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s<br> // RUN: %clang -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s<br>+// RUN: %clang -### -S -Os -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s<br>+// RUN: %clang -### -S -Oz -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s<br>+// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s<br> // RUN: %clang -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s<br> // RUN: %clang -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s<br> // CHECK-REROLL-LOOPS: "-freroll-loops"<br><br><br>_______________________________________________<br>cfe-commits mailing list<br>cfe-commits@lists.llvm.org<br>http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits<br></div></div></span></blockquote></body></html>