Skip to content

Commit dfd10ae

Browse files
author
Greg Parker
committed
[test] Remove CPU=i386_or_x86_64 hack.
LLVM lit now supports boolean expressions in REQUIRES: directives.
1 parent c7018ba commit dfd10ae

30 files changed

+29
-32
lines changed

docs/Testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ FIXME: full list.
431431
* ``swift_ast_verifier``: present if the AST verifier is enabled in this build.
432432

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

436436
* ``swift_test_mode_optimize[_unchecked|none]`` and
437437
``swift_test_mode_optimize[_unchecked|none]_<CPUNAME>``: specify a test mode

test/DebugInfo/linetable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -emit-ir -g -o - | %FileCheck %s
22
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -S -g -o - | %FileCheck %s --check-prefix ASM-CHECK
33

4-
// REQUIRES: CPU=i386_or_x86_64
4+
// REQUIRES: CPU=i386 || CPU=x86_64
55

66
import Swift
77
func markUsed<T>(_ t: T) {}

test/IRGen/asmname.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

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

test/IRGen/associated_types.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
protocol Runcer {
66
associatedtype Runcee

test/IRGen/bitcast.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
sil_stage canonical
66

test/IRGen/bitcast_different_size.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -verify | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
sil_stage canonical
66

test/IRGen/casts.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44
// XFAIL: linux
55

66
sil_stage canonical

test/IRGen/cf.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44
// REQUIRES: objc_interop
55

66
// CHECK: [[TYPE:%swift.type]] = type

test/IRGen/clang_inline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: %FileCheck %s < %t.ll
1313
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.ll
1414

15-
// REQUIRES: CPU=i386_or_x86_64
15+
// REQUIRES: CPU=i386 || CPU=x86_64
1616
// XFAIL: linux
1717

1818
#if IMPORT_EMPTY

test/IRGen/clang_inline_reverse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// 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
44

5-
// REQUIRES: CPU=i386_or_x86_64
5+
// REQUIRES: CPU=i386 || CPU=x86_64
66
// XFAIL: linux
77

88
import gizmo

test/IRGen/dynamic_cast.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
// We have to claim this is raw SIL because there are critical edges from non
66
// cond_br instructions.

test/IRGen/dynamic_lookup.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44
// REQUIRES: objc_interop
55

66
import Swift

test/IRGen/dynamic_self.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
sil_stage canonical
66

test/IRGen/enum.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
// We have to claim this is raw SIL because there are critical edges from non
66
// cond_br instructions.

test/IRGen/enum_spare_bits.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %build-irgen-test-overlays
33
// 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
44

5-
// REQUIRES: CPU=i386_or_x86_64
5+
// REQUIRES: CPU=i386 || CPU=x86_64
66
// REQUIRES: objc_interop
77

88
import Swift

test/IRGen/fixlifetime.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// 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
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s
44

5-
// REQUIRES: CPU=i386_or_x86_64
5+
// REQUIRES: CPU=i386 || CPU=x86_64
66

77
// At -Onone we don't run the LLVM ARC optimizer, so the fixLifetime call is
88
// unnecessary.

test/IRGen/generic_class_anyobject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44
// REQUIRES: objc_interop
55

66
func foo<T: AnyObject>(_ x: T) -> T { return x }

test/IRGen/generic_classes_objc.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %build-irgen-test-overlays
33
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -Xllvm -new-mangling-for-tests %s -emit-ir | %FileCheck %s
44

5-
// REQUIRES: CPU=i386_or_x86_64
5+
// REQUIRES: CPU=i386 || CPU=x86_64
66
// REQUIRES: objc_interop
77

88
import Builtin

test/IRGen/generic_ternary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
// <rdar://problem/13793646>
66
struct OptionalStreamAdaptor<T : IteratorProtocol> {

test/IRGen/indirect_return.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
// CHECK: define hidden swiftcc void @_T015indirect_return11generic_get{{[_0-9a-zA-Z]*}}F
66
func generic_get<T>(p: UnsafeMutablePointer<T>) -> T {

test/IRGen/infinite_archetype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
protocol Fooable {
66
associatedtype Foo

test/IRGen/lazy_multi_file.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
// CHECK: %C15lazy_multi_file8Subclass = type <{ %swift.refcounted, %[[OPTIONAL_INT_TY:GSqSi_]], [{{[0-9]+}} x i8], %SS }>
66
// CHECK: %[[OPTIONAL_INT_TY]] = type <{ [{{[0-9]+}} x i8], [1 x i8] }>

test/IRGen/metatype_casts.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44
// XFAIL: linux
55

66
import Swift

test/IRGen/nondominant.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
import Builtin
66

test/IRGen/objc_alloc.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %build-irgen-test-overlays
33
// 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
44

5-
// REQUIRES: CPU=i386_or_x86_64
5+
// REQUIRES: CPU=i386 || CPU=x86_64
66
// REQUIRES: objc_interop
77

88
sil_stage canonical

test/IRGen/protocol_extensions.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
import Builtin
66

test/IRGen/select_enum_single_payload.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
2-
// REQUIRES: CPU=i386_or_x86_64
2+
// REQUIRES: CPU=i386 || CPU=x86_64
33

44
sil_stage canonical
55

test/IRGen/witness_method.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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
22

3-
// REQUIRES: CPU=i386_or_x86_64
3+
// REQUIRES: CPU=i386 || CPU=x86_64
44

55
sil_stage canonical
66

test/Parse/enum.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// FIXME: this test only passes on platforms which have Float80.
44
// <rdar://problem/19508460> Floating point enum raw values are not portable
55

6-
// REQUIRES: CPU=i386_or_x86_64
6+
// REQUIRES: CPU=i386 || CPU=x86_64
77

88
enum Empty {}
99

test/lit.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,6 @@ config.available_features.add("CPU=" + run_cpu)
461461
config.available_features.add("OS=" + run_os)
462462
config.available_features.add("PTRSIZE=" + run_ptrsize)
463463

464-
if run_cpu == "i386" or run_cpu == "x86_64":
465-
config.available_features.add("CPU=i386_or_x86_64")
466-
467464
config.available_features.add("SWIFT_VERSION=" + swift_version)
468465

469466
if "optimized_stdlib" in config.available_features:

0 commit comments

Comments
 (0)