[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 23 21:32:16 PST 2017


mgorny added inline comments.


================
Comment at: test/CodeGen/atomic-ops.c:1
-// RUN: %clang_cc1 %s -emit-llvm -o - -ffreestanding -ffake-address-space-map -triple=i686-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -ffreestanding -ffake-address-space-map -triple=i686-apple-darwin9 -target-cpu i686 | FileCheck %s
 // REQUIRES: x86-registered-target
----------------
hans wrote:
> Naive question: why is the i686- part of the triple not sufficient here; why is -target-cpu needed?
It's because triple is not really meaningful on most of the systems (e.g. many Linux distros use i386, *BSD use i486), and the default CPU logic is applied in the Driver, while cc1 is called directly here.


https://reviews.llvm.org/D29542





More information about the cfe-commits mailing list