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(
781781 invocationArgStrs.push_back (" -march=z13" );
782782 }
783783
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+
784790 if (!importerOpts.Optimization .empty ()) {
785791 invocationArgStrs.push_back (importerOpts.Optimization );
786792 }
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