<div dir="ltr">That check should not be needed because getHostCPUFeatures() should also be called and detect that SSE41 is not supported. This should then pass "-sse41" into the feature selection.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 21, 2015 at 2:23 PM, Barto via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lvm 3.7.0 treats pentium dual core ( cpu family 6 model 23 ) as "penryn"<br>
cpu, which triggers a serious bug :<br>
<br>
- crashs in openGL programs when llvm is used by mesa package, llvm will<br>
produces binary code with SSE4 instructions, which is not compatible<br>
with pentium dual core, because this CPU doesn't support SSE4<br>
instructions ( bad cpu opcodes ),<br>
<br>
with llvm 3.6.2 this bug doesn't occur because pentium dual core was<br>
treated as "core2" cpu, which is the good behaviour,<br>
<br>
the llvm git commit who has introduced this bug is :<br>
<br>
cd83d5b5071f072882ad06cc4b904b2d27d1e54a<br>
<br>
<a href="https://github.com/llvm-mirror/llvm/commit/cd83d5b5071f072882ad06cc4b904b2d27d1e54a" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/llvm/commit/cd83d5b5071f072882ad06cc4b904b2d27d1e54a</a><br>
<br>
this faulty commit has deleted a crucial test about SSE4 for CPU family<br>
6 model 23 :<br>
<br>
return HasSSE41 ? "penryn" : "core2";<br>
<br>
the solution is simply to re-add this test for CPU family 6 model 23,<br>
here is the patch :<br>
<br>
--- a/lib/Support/Host.cpp    2015-10-14 07:13:52.381374679 +0200<br>
+++ b/lib/Support/Host.cpp   2015-10-14 07:13:28.224708323 +0200<br>
@@ -332,6 +332,8 @@<br>
                // 17h. All processors are manufactured using the 45 nm process.<br>
                //<br>
                // 45nm: Penryn , Wolfdale, Yorkfield (XE)<br>
+        // Not all Penryn processors support SSE 4.1 (such as the Pentium brand)<br>
+        return HasSSE41 ? "penryn" : "core2";<br>
       case 29: // Intel Xeon processor MP. All processors are manufactured using<br>
                // the 45 nm process.<br>
         return "penryn";<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>