<div dir="auto">This would be because at that point the default cpu was that and it probably had something to do with fallbacks. <div dir="auto"><br></div><div dir="auto">At this point it can be changed I imagine to whatever makes sense. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 19, 2020, 1:12 AM Craig Topper via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">craig.topper added a subscriber: ddunbar.<br>
craig.topper added a comment.<br>
<br>
In D85384#2225434 <<a href="https://reviews.llvm.org/D85384#2225434" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D85384#2225434</a>>, @phosek wrote:<br>
<br>
> This seems to have broken our Mac builders with the following error:<br>
><br>
>   -- Testing: 25226 tests, 24 workers --<br>
>   Testing:  0.. 10.. 20.<br>
>   FAIL: Clang :: Frontend/ast-main.c (6834 of 25226)<br>
>   ******************** TEST 'Clang :: Frontend/ast-main.c' FAILED ********************<br>
>   Script:<br>
>   --<br>
>   : 'RUN: at line 1';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -emit-llvm -S -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp1.ll -x c - < /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.c<br>
>   : 'RUN: at line 2';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -emit-ast -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp.ast /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.c<br>
>   : 'RUN: at line 3';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -emit-llvm -S -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp2.ll -x ast - < /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp.ast<br>
>   : 'RUN: at line 4';   diff /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp1.ll /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.c.tmp2.ll<br>
>   --<br>
>   Exit Code: 1<br>
>   <br>
>   Command Output (stdout):<br>
>   --<br>
>   14c14<br>
>   < attributes #0 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   ---<br>
>   > attributes #0 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   <br>
>   --<br>
>   <br>
>   ********************<br>
>   Testing:  0.. 10.. 20.<br>
>   FAIL: Clang :: Frontend/ast-main.cpp (6835 of 25226)<br>
>   ******************** TEST 'Clang :: Frontend/ast-main.cpp' FAILED ********************<br>
>   Script:<br>
>   --<br>
>   : 'RUN: at line 1';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -emit-llvm -S -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp1.ll -x c++ - < /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.cpp<br>
>   : 'RUN: at line 2';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -fno-delayed-template-parsing -emit-ast -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp.ast /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.cpp<br>
>   : 'RUN: at line 3';   env SDKROOT="/" /b/s/w/ir/k/staging/llvm_build/bin/clang -emit-llvm -S -o /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp2.ll -x ast - < /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp.ast<br>
>   : 'RUN: at line 4';   diff /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp1.ll /b/s/w/ir/k/staging/llvm_build/tools/clang/test/Frontend/Output/ast-main.cpp.tmp2.ll<br>
>   --<br>
>   Exit Code: 1<br>
>   <br>
>   Command Output (stdout):<br>
>   --<br>
>   37,39c37,39<br>
>   < attributes #0 = { noinline optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   < attributes #1 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   < attributes #2 = { noinline norecurse nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   ---<br>
>   > attributes #0 = { noinline optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   > attributes #1 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   > attributes #2 = { noinline norecurse nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
>   <br>
>   --<br>
>   Command Output (stderr):<br>
>   --<br>
>   <stdin>:14:1: warning: non-void function does not return a value [-Wreturn-type]<br>
>   }<br>
>   ^<br>
>   <stdin>:17:14: note: in instantiation of member function 'S<int>::mf' requested here<br>
>       S<int>().mf();<br>
>                ^<br>
>   1 warning generated.<br>
>   /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.cpp:14:1: warning: non-void function does not return a value [-Wreturn-type]<br>
>   }<br>
>   ^<br>
>   /b/s/w/ir/k/llvm-project/clang/test/Frontend/ast-main.cpp:17:14: note: in instantiation of member function 'S<int>::mf' requested here<br>
>       S<int>().mf();<br>
>                ^<br>
>   1 warning generated.<br>
>   <br>
>   --<br>
>   <br>
>   ********************<br>
>   Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. <br>
>   ********************<br>
>   Failed Tests (2):<br>
>     Clang :: Frontend/ast-main.c<br>
>     Clang :: Frontend/ast-main.cpp<br>
>   <br>
>   <br>
>   Testing Time: 225.68s<br>
>     Unsupported      :   564<br>
>     Passed           : 24636<br>
>     Expectedly Failed:    24<br>
>     Failed           :     2<br>
><br>
> Specifically, the `tune-cpu` attribute seems to be missing on Darwin. Would it be possible to take a look?<br>
<br>
I suspect this is somehow related to the very old code in lib/Driver/ToolChains/Darwin.cpp that forces a -mtune=core2 into the command line. But I'm not clear yet why that code is there. @ddunbar looks like you added that code in 2009? Can you shed any light on what its for?<br>
<br>
<br>
Repository:<br>
  rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D85384/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D85384/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D85384" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D85384</a><br>
<br>
</blockquote></div>