[llvm-dev] bad identification of the CPU pentium dual core ( penryn instead of core2 )

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 21 13:43:06 PDT 2015


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.

On Wed, Oct 21, 2015 at 2:23 PM, Barto via llvm-dev <llvm-dev at lists.llvm.org
> wrote:

> lvm 3.7.0 treats pentium dual core ( cpu family 6 model 23 ) as "penryn"
> cpu, which triggers a serious bug :
>
> - crashs in openGL programs when llvm is used by mesa package, llvm will
> produces binary code with SSE4 instructions, which is not compatible
> with pentium dual core, because this CPU doesn't support SSE4
> instructions ( bad cpu opcodes ),
>
> with llvm 3.6.2 this bug doesn't occur because pentium dual core was
> treated as "core2" cpu, which is the good behaviour,
>
> the llvm git commit who has introduced this bug is :
>
> cd83d5b5071f072882ad06cc4b904b2d27d1e54a
>
>
> https://github.com/llvm-mirror/llvm/commit/cd83d5b5071f072882ad06cc4b904b2d27d1e54a
>
> this faulty commit has deleted a crucial test about SSE4 for CPU family
> 6 model 23 :
>
> return HasSSE41 ? "penryn" : "core2";
>
> the solution is simply to re-add this test for CPU family 6 model 23,
> here is the patch :
>
> --- a/lib/Support/Host.cpp    2015-10-14 07:13:52.381374679 +0200
> +++ b/lib/Support/Host.cpp   2015-10-14 07:13:28.224708323 +0200
> @@ -332,6 +332,8 @@
>                 // 17h. All processors are manufactured using the 45 nm
> process.
>                 //
>                 // 45nm: Penryn , Wolfdale, Yorkfield (XE)
> +        // Not all Penryn processors support SSE 4.1 (such as the Pentium
> brand)
> +        return HasSSE41 ? "penryn" : "core2";
>        case 29: // Intel Xeon processor MP. All processors are
> manufactured using
>                 // the 45 nm process.
>          return "penryn";
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151021/281713c6/attachment.html>


More information about the llvm-dev mailing list