mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-26 06:48:51 -04:00

Use the new cx8 feature flag that was added to the backend to represent support for cmpxchg8b. Use this flag to set the MaxAtomicInlineWidth. This also assumes all the cmpxchg instructions are enabled for CK_Generic which is what cc1 defaults to when nothing is specified. Differential Revision: https://reviews.llvm.org/D59566 llvm-svn: 356709
17 lines
782 B
C
17 lines
782 B
C
// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu x86-64 -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=HARD
|
|
// RUN: %clang_cc1 -msoft-float -triple x86_64-linux-gnu -target-cpu x86-64 -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=SOFT
|
|
|
|
int __attribute__((target("x87"))) foo(int a) { return 4; }
|
|
int __attribute__((target("no-x87"))) bar(int a) { return 4; }
|
|
|
|
// CHECK: foo{{.*}} #0
|
|
// CHECK: bar{{.*}} #1
|
|
|
|
// CHECK: #0 = {{.*}}"target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87"
|
|
// HARD: "use-soft-float"="false"
|
|
// SOFT: "use-soft-float"="true"
|
|
|
|
// CHECK: #1 = {{.*}}"target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,-x87"
|
|
// HARD: "use-soft-float"="false"
|
|
// SOFT: "use-soft-float"="true"
|