Skip to content

[test] Revert "[test] Remove CPU=i386_or_x86_64 hack." #7825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ FIXME: full list.
* ``swift_ast_verifier``: present if the AST verifier is enabled in this build.

* When writing a test specific to x86, if possible, prefer ``REQUIRES:
CPU=i386 || CPU=x86_64`` over ``REQUIRES: CPU=x86_64``.
CPU=i386_or_x86_64`` to ``REQUIRES: CPU=x86_64``.

* ``swift_test_mode_optimize[_unchecked|none]`` and
``swift_test_mode_optimize[_unchecked|none]_<CPUNAME>``: specify a test mode
Expand Down
2 changes: 1 addition & 1 deletion test/DebugInfo/linetable.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -S -g -o - | %FileCheck %s --check-prefix ASM-CHECK

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

import Swift
func markUsed<T>(_ t: T) {}
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/asmname.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

@_silgen_name("atan2") func atan2test(_ a: Double, _ b: Double) -> Double

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/associated_types.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

protocol Runcer {
associatedtype Runcee
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/bitcast.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

sil_stage canonical

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/bitcast_different_size.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -verify | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

sil_stage canonical

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/casts.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -Xllvm -sil-disable-pass="External Defs To Decls" %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// XFAIL: linux

sil_stage canonical
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/cf.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %s -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

// CHECK: [[TYPE:%swift.type]] = type
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/clang_inline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// RUN: %FileCheck %s < %t.ll
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.ll

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// XFAIL: linux

#if IMPORT_EMPTY
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/clang_inline_reverse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -emit-ir -module-name clang_inline | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// XFAIL: linux

import gizmo
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/dynamic_cast.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// We have to claim this is raw SIL because there are critical edges from non
// cond_br instructions.
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/dynamic_lookup.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

import Swift
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/dynamic_self.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

sil_stage canonical

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/enum.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime-%target-ptrsize

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// We have to claim this is raw SIL because there are critical edges from non
// cond_br instructions.
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/enum_spare_bits.sil
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -new-mangling-for-tests %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

import Swift
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/fixlifetime.sil
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s | %FileCheck --check-prefix=CHECK-%target-runtime %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// At -Onone we don't run the LLVM ARC optimizer, so the fixLifetime call is
// unnecessary.
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/generic_class_anyobject.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

func foo<T: AnyObject>(_ x: T) -> T { return x }
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/generic_classes_objc.sil
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -new-mangling-for-tests %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

import Builtin
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/generic_ternary.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// <rdar://problem/13793646>
struct OptionalStreamAdaptor<T : IteratorProtocol> {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/indirect_return.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// CHECK: define hidden swiftcc void @_T015indirect_return11generic_get{{[_0-9a-zA-Z]*}}F
func generic_get<T>(p: UnsafeMutablePointer<T>) -> T {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/infinite_archetype.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

protocol Fooable {
associatedtype Foo
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/lazy_multi_file.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

// CHECK: %T15lazy_multi_file8SubclassC = type <{ %swift.refcounted, %[[OPTIONAL_INT_TY:TSiSg]], [{{[0-9]+}} x i8], %TSS }>
// CHECK: %[[OPTIONAL_INT_TY]] = type <{ [{{[0-9]+}} x i8], [1 x i8] }>
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/metatype_casts.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// XFAIL: linux

import Swift
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/nondominant.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

import Builtin

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/objc_alloc.sil
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop

sil_stage canonical
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/protocol_extensions.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

import Builtin

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/select_enum_single_payload.sil
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

sil_stage canonical

Expand Down
5 changes: 4 additions & 1 deletion test/IRGen/witness_method.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s

// REQUIRES: CPU=i386 || CPU=x86_64
// FIXME: rdar://30765842 redundant call to protocol witness table accessor
// REQUIRES: rdar30765842

// REQUIRES: CPU=i386_or_x86_64

sil_stage canonical

Expand Down
2 changes: 1 addition & 1 deletion test/Parse/enum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FIXME: this test only passes on platforms which have Float80.
// <rdar://problem/19508460> Floating point enum raw values are not portable

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: CPU=i386_or_x86_64

enum Empty {}

Expand Down
3 changes: 3 additions & 0 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ config.available_features.add("CPU=" + run_cpu)
config.available_features.add("OS=" + run_os)
config.available_features.add("PTRSIZE=" + run_ptrsize)

if run_cpu == "i386" or run_cpu == "x86_64":
config.available_features.add("CPU=i386_or_x86_64")

config.available_features.add("SWIFT_VERSION=" + swift_version)

if "optimized_stdlib" in config.available_features:
Expand Down