Skip to content

Commit ee3875b

Browse files
Merge pull request swiftlang#72261 from nate-chandler/rdar124464363
[Test] Eased check lines for 32-bit.
2 parents bb57e4b + cde2ca8 commit ee3875b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

test/SILOptimizer/builtins.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -enable-builtin-module -O -emit-sil %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -enable-builtin-module -O -emit-sil %s | %IRGenFileCheck %s
22

33
import Builtin
44

@@ -10,7 +10,7 @@ import Builtin
1010
// CHECK-SAME: {{%[^,]+}} : $@thick T.Type):
1111
// CHECK: [[SELF_RAW_VALUE:%[^,]+]] = struct_extract [[SELF]] : {{.*}} #UnsafeMutableRawPointer._rawValue
1212
// CHECK: [[OFFSET_VALUE:%[^,]+]] = struct_extract [[OFFSET]] : {{.*}} #Int._value
13-
// CHECK: [[OFFSET_WORD:%[^,]+]] = builtin "truncOrBitCast_Int64_Word"([[OFFSET_VALUE]] : $Builtin.Int64)
13+
// CHECK: [[OFFSET_WORD:%[^,]+]] = builtin "{{trunc|sext}}OrBitCast_Int[[PTR_SIZE]]_Word"([[OFFSET_VALUE]] : $Builtin.Int[[PTR_SIZE]])
1414
// CHECK: [[DESTINATION_POINTER:%[^,]+]] = index_raw_pointer [[SELF_RAW_VALUE]] : $Builtin.RawPointer, [[OFFSET_WORD]]
1515
// CHECK: [[DESTINATION:%[^,]+]] = pointer_to_address [[DESTINATION_POINTER]] : $Builtin.RawPointer to [align=1]
1616
// CHECK: copy_addr [[VALUE]] to [[DESTINATION]]

test/SILOptimizer/stdlib/Atomics.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -O -emit-sil -disable-availability-checking %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -O -emit-sil -disable-availability-checking %s | %IRGenFileCheck %s
22

33
// REQUIRES: synchronization
44

@@ -11,7 +11,7 @@ import Synchronization
1111
// CHECK-LABEL: sil {{.*}} @localLoad {{.*}} {
1212
// CHECK: [[ATOMIC:%.*]] = alloc_stack [lexical] [var_decl] $Atomic<Int>
1313
// CHECK: [[ATOMIC_PTR:%.*]] = address_to_pointer [[ATOMIC]]
14-
// CHECK: builtin "atomicload_monotonic_Int64"([[ATOMIC_PTR]] : $Builtin.RawPointer)
14+
// CHECK: builtin "atomicload_monotonic_Int[[PTR_SIZE]]"([[ATOMIC_PTR]] : $Builtin.RawPointer)
1515
// CHECK: destroy_addr [[ATOMIC]] : $*Atomic<Int>
1616
// CHECK-NEXT: dealloc_stack [[ATOMIC]] : $*Atomic<Int>
1717
// CHECK-LABEL: } // end sil function 'localLoad'
@@ -24,7 +24,7 @@ func localLoad() -> Int {
2424
// CHECK-LABEL: sil {{.*}} @localStore {{.*}} {
2525
// CHECK: [[ATOMIC:%.*]] = alloc_stack [lexical] [var_decl] $Atomic<Int>
2626
// CHECK: [[ATOMIC_PTR:%.*]] = address_to_pointer [[ATOMIC]]
27-
// CHECK: builtin "atomicstore_release_Int64"([[ATOMIC_PTR]] : $Builtin.RawPointer
27+
// CHECK: builtin "atomicstore_release_Int[[PTR_SIZE]]"([[ATOMIC_PTR]] : $Builtin.RawPointer
2828
// CHECK: destroy_addr [[ATOMIC]] : $*Atomic<Int>
2929
// CHECK-NEXT: dealloc_stack [[ATOMIC]] : $*Atomic<Int>
3030
// CHECK-LABEL: } // end sil function 'localStore'
@@ -37,7 +37,7 @@ func localStore() {
3737
// CHECK-LABEL: sil {{.*}} @localExchange {{.*}} {
3838
// CHECK: [[ATOMIC:%.*]] = alloc_stack [lexical] [var_decl] $Atomic<Int>
3939
// CHECK: [[ATOMIC_PTR:%.*]] = address_to_pointer [[ATOMIC]]
40-
// CHECK: builtin "atomicrmw_xchg_acquire_Int64"([[ATOMIC_PTR]] : $Builtin.RawPointer
40+
// CHECK: builtin "atomicrmw_xchg_acquire_Int[[PTR_SIZE]]"([[ATOMIC_PTR]] : $Builtin.RawPointer
4141
// CHECK: destroy_addr [[ATOMIC]] : $*Atomic<Int>
4242
// CHECK-NEXT: dealloc_stack [[ATOMIC]] : $*Atomic<Int>
4343
// CHECK-LABEL: } // end sil function 'localExchange'
@@ -50,7 +50,7 @@ func localExchange() -> Int {
5050
// CHECK-LABEL: sil {{.*}} @localCompareExchange {{.*}} {
5151
// CHECK: [[ATOMIC:%.*]] = alloc_stack [lexical] [var_decl] $Atomic<Int>
5252
// CHECK: [[ATOMIC_PTR:%.*]] = address_to_pointer [[ATOMIC]]
53-
// CHECK: builtin "cmpxchg_seqcst_seqcst_Int64"([[ATOMIC_PTR]] : $Builtin.RawPointer
53+
// CHECK: builtin "cmpxchg_seqcst_seqcst_Int[[PTR_SIZE]]"([[ATOMIC_PTR]] : $Builtin.RawPointer
5454
// CHECK: destroy_addr [[ATOMIC]] : $*Atomic<Int>
5555
// CHECK-NEXT: dealloc_stack [[ATOMIC]] : $*Atomic<Int>
5656
// CHECK-LABEL: } // end sil function 'localCompareExchange'

test/lit.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@ else:
28622862

28632863
# A FileCheck that automatically supports a large variety of target
28642864
# conditionalization that's useful in IRGen.
2865-
IRGenFileCheck = '%s --check-prefix=CHECK --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s -DINT=i%s -D#CLASS_METADATA_HEADER=%s' % (
2865+
IRGenFileCheck = '%s --check-prefix=CHECK --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s --check-prefix=CHECK-%s -DINT=i%s -DPTR_SIZE=%s -D#CLASS_METADATA_HEADER=%s' % (
28662866
run_filecheck,
28672867
run_os,
28682868
run_cpu,
@@ -2871,6 +2871,7 @@ IRGenFileCheck = '%s --check-prefix=CHECK --check-prefix=CHECK-%s --check-prefix
28712871
run_ptrauth,
28722872
run_objc_interop,
28732873
run_ptrsize,
2874+
run_ptrsize,
28742875
run_class_metadata_header_size)
28752876
config.substitutions.append( ('%IRGenFileCheck', IRGenFileCheck) )
28762877

0 commit comments

Comments
 (0)