File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -781,6 +781,12 @@ importer::addCommonInvocationArguments(
781
781
invocationArgStrs.push_back (" -march=z13" );
782
782
}
783
783
784
+ if (triple.getArch () == llvm::Triple::x86_64) {
785
+ // Enable double wide atomic intrinsics on every x86_64 target.
786
+ // (This is the default on Darwin, but not so on other platforms.)
787
+ invocationArgStrs.push_back (" -mcx16" );
788
+ }
789
+
784
790
if (!importerOpts.Optimization .empty ()) {
785
791
invocationArgStrs.push_back (importerOpts.Optimization );
786
792
}
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -target x86_64-unknown-linux-gnu -disable-legacy-type-info -parse-stdlib -disable-objc-interop %s -module-name main -emit-ir -o - | %FileCheck %s
2
+ // RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -disable-legacy-type-info -parse-stdlib -disable-objc-interop %s -module-name main -emit-ir -o - | %FileCheck %s
3
+ // RUN: %target-swift-frontend -target x86_64-unknown-freebsd -disable-legacy-type-info -parse-stdlib -disable-objc-interop %s -module-name main -emit-ir -o - | %FileCheck %s
4
+ // RUN: %target-swift-frontend -target x86_64-apple-macosx10.9 -disable-legacy-type-info -parse-stdlib -module-name main %s -emit-ir -o - | %FileCheck %s
5
+
6
+ // REQUIRES: CODEGENERATOR=X86
7
+
8
+ public func test( ) {
9
+ }
10
+
11
+ // We expect double-wide atomic intrinsics to always be available on x86_64.
12
+ // CHECK: "target-features"="{{.*}}+cx16,
You can’t perform that action at this time.
0 commit comments