Skip to content

Commit

Permalink
[test] Fix conditional conformance tests for 32-bit platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw authored and xedin committed Nov 11, 2017
1 parent c2b80a8 commit 5c0f158
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
4 changes: 4 additions & 0 deletions test/IRGen/conditional_conformances.swift
Original file line number Diff line number Diff line change
@@ -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

4 changes: 2 additions & 2 deletions test/IRGen/protocol_resilience.sil
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
5 changes: 0 additions & 5 deletions test/Inputs/conditional_conformance_basic_conformances.swift
Original file line number Diff line number Diff line change
@@ -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: P1>(_: T.Type) {}
public protocol P1 {
func normal()
Expand Down
5 changes: 0 additions & 5 deletions test/Inputs/conditional_conformance_subclass.swift
Original file line number Diff line number Diff line change
@@ -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: P1>(_: T.Type) {}
public protocol P1 {
func normal()
Expand Down
5 changes: 0 additions & 5 deletions test/Inputs/conditional_conformance_with_assoc.swift
Original file line number Diff line number Diff line change
@@ -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: P1>(_: T.Type) {}
public protocol P1 {
associatedtype AT1
Expand Down
2 changes: 2 additions & 0 deletions test/Interpreter/conditional_conformances_modules.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c0f158

Please sign in to comment.