Skip to content

getX86TargetCPU: prefer native instead of pentium4 #15498

@llvmbot

Description

@llvmbot
Bugzilla Link 15126
Version 3.2
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

(I'm not sure if this is a configuration/build issue of my Linux distribution.)

In lib/Driver/Tools.cpp getX86TargetCPU returns "pentium4" without given -march/-target-cpu on my system (athlon-xp, i686-pc-linux-gnu). The problem is, that the generated code contains SSE2 instructions not available on this CPU and programs exit with SIGILL. llvm::sys::getHostCPUName() correctly returns "athlon-xp".

May be related to Bug 2051.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions