From 5c0f158f88ddcadb9b28ff4c970dedc2a5e0a760 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Fri, 10 Nov 2017 17:57:42 -0800 Subject: [PATCH] [test] Fix conditional conformance tests for 32-bit platforms. --- test/IRGen/conditional_conformances.swift | 4 ++++ test/IRGen/protocol_resilience.sil | 4 ++-- test/Inputs/conditional_conformance_basic_conformances.swift | 5 ----- test/Inputs/conditional_conformance_subclass.swift | 5 ----- test/Inputs/conditional_conformance_with_assoc.swift | 5 ----- test/Interpreter/conditional_conformances_modules.swift | 2 ++ 6 files changed, 8 insertions(+), 17 deletions(-) diff --git a/test/IRGen/conditional_conformances.swift b/test/IRGen/conditional_conformances.swift index 7729d33d582a4..c8b6a2cff9724 100644 --- a/test/IRGen/conditional_conformances.swift +++ b/test/IRGen/conditional_conformances.swift @@ -1,3 +1,7 @@ // RUN: %target-swift-frontend -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift // RUN: %target-swift-frontend -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift | %FileCheck %S/../Inputs/conditional_conformance_with_assoc.swift // RUN: %target-swift-frontend -emit-ir %S/../Inputs/conditional_conformance_subclass.swift | %FileCheck %S/../Inputs/conditional_conformance_subclass.swift + +// Too many pointer-sized integers in the IR +// REQUIRES: PTRSIZE=64 + diff --git a/test/IRGen/protocol_resilience.sil b/test/IRGen/protocol_resilience.sil index 5ad5af8636e59..ddfbb619a2792 100644 --- a/test/IRGen/protocol_resilience.sil +++ b/test/IRGen/protocol_resilience.sil @@ -296,9 +296,9 @@ bb0(%0 : $*ResilientConformingType): // CHECK-LABEL: define{{( protected)?}} i8** @_T019protocol_resilience23ResilientConformingTypeV010resilient_A005OtherC8ProtocolAAWa() // CHECK-NEXT: entry: -// CHECK-NEXT: %conditional.tables = alloca %swift.witness_table_slice, align 8 +// CHECK-NEXT: %conditional.tables = alloca %swift.witness_table_slice // CHECK-NEXT: [[COUNT_PTR:%.*]] = getelementptr inbounds %swift.witness_table_slice, %swift.witness_table_slice* %conditional.tables, i32 0, i32 1 -// CHECK-NEXT: store i64 0, i64* [[COUNT_PTR]] +// CHECK-NEXT: store [[WORD:i(32|64)]] 0, [[WORD:i(32|64)]]* [[COUNT_PTR]] // CHECK-NEXT: [[INSTANTIATION_ARGS:%.*]] = bitcast %swift.witness_table_slice* %conditional.tables to i8** // CHECK-NEXT: [[WTABLE:%.*]] = call i8** @swift_rt_swift_getGenericWitnessTable(%swift.generic_witness_table_cache* @_T019protocol_resilience23ResilientConformingTypeV010resilient_A005OtherC8ProtocolAAWG, %swift.type* null, i8** [[INSTANTIATION_ARGS]]) // CHECK-NEXT: ret i8** [[WTABLE]] diff --git a/test/Inputs/conditional_conformance_basic_conformances.swift b/test/Inputs/conditional_conformance_basic_conformances.swift index f948a3c779d3a..e5b268145b3eb 100644 --- a/test/Inputs/conditional_conformance_basic_conformances.swift +++ b/test/Inputs/conditional_conformance_basic_conformances.swift @@ -1,8 +1,3 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s - -// Too many pointer-sized integers in the IR -// REQUIRES: PTRSIZE=64 - public func takes_p1(_: T.Type) {} public protocol P1 { func normal() diff --git a/test/Inputs/conditional_conformance_subclass.swift b/test/Inputs/conditional_conformance_subclass.swift index c0c0bf53c6139..96d05252967e4 100644 --- a/test/Inputs/conditional_conformance_subclass.swift +++ b/test/Inputs/conditional_conformance_subclass.swift @@ -1,8 +1,3 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s - -// Too many pointer-sized integers in the IR -// REQUIRES: PTRSIZE=64 - public func takes_p1(_: T.Type) {} public protocol P1 { func normal() diff --git a/test/Inputs/conditional_conformance_with_assoc.swift b/test/Inputs/conditional_conformance_with_assoc.swift index d43d00b3c51fc..63af461479ecd 100644 --- a/test/Inputs/conditional_conformance_with_assoc.swift +++ b/test/Inputs/conditional_conformance_with_assoc.swift @@ -1,8 +1,3 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s - -// Too many pointer-sized integers in the IR -// REQUIRES: PTRSIZE=64 - public func takes_p1(_: T.Type) {} public protocol P1 { associatedtype AT1 diff --git a/test/Interpreter/conditional_conformances_modules.swift b/test/Interpreter/conditional_conformances_modules.swift index 9e1559c8bba18..b5c94aef5873d 100644 --- a/test/Interpreter/conditional_conformances_modules.swift +++ b/test/Interpreter/conditional_conformances_modules.swift @@ -7,6 +7,8 @@ // RUN: %target-run %t/conditional_conformances_modules %t/libBasic.%target-dylib-extension %t/libWithAssoc.%target-dylib-extension // REQUIRES: executable_test +// FIXME: seems to fail on 32-bit simulator? +// REQUIRES: OS=macosx || OS=linux import Basic import WithAssoc