From 09146b1714e938199a5a2312516ef91e7207c075 Mon Sep 17 00:00:00 2001 From: "Kuba (Brecka) Mracek" Date: Fri, 7 Nov 2025 10:48:50 -0800 Subject: [PATCH 1/2] Relax expectations in SectionTopLevel.swift for 32-bit and arm64e --- test/ConstValues/SectionTopLevel.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/ConstValues/SectionTopLevel.swift b/test/ConstValues/SectionTopLevel.swift index 78a1090dbd11..f061893cb7dc 100644 --- a/test/ConstValues/SectionTopLevel.swift +++ b/test/ConstValues/SectionTopLevel.swift @@ -36,12 +36,12 @@ func bar(x: Int) -> String { return "test" } @section("mysection") let tuple2: (Int, Float, Bool) = (42, 3.14, false) // ok @section("mysection") let tuple3 = (foo, bar) // ok (function references in tuple) -// CHECK: @"$s15SectionTopLevel11intLiteral1Sivp" = {{.*}}constant %TSi <{ i64 42 }>, section "mysection" +// CHECK: @"$s15SectionTopLevel11intLiteral1Sivp" = {{.*}}constant %TSi <{ {{i64|i32}} 42 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral2s4Int8Vvp" = {{.*}}constant %Ts4Int8V <{ i8 127 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral3s5Int16Vvp" = {{.*}}constant %Ts5Int16V <{ i16 32767 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral4s5Int32Vvp" = {{.*}}constant %Ts5Int32V <{ i32 2147483647 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral5s5Int64Vvp" = {{.*}}constant %Ts5Int64V <{ i64 9223372036854775807 }>, section "mysection" -// CHECK: @"$s15SectionTopLevel11intLiteral6Suvp" = {{.*}}constant %TSu <{ i64 42 }>, section "mysection" +// CHECK: @"$s15SectionTopLevel11intLiteral6Suvp" = {{.*}}constant %TSu <{ {{i64|i32}} 42 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral7s5UInt8Vvp" = {{.*}}constant %Ts5UInt8V <{ i8 -1 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral8s6UInt16Vvp" = {{.*}}constant %Ts6UInt16V <{ i16 -1 }>, section "mysection" // CHECK: @"$s15SectionTopLevel11intLiteral9s6UInt32Vvp" = {{.*}}constant %Ts6UInt32V <{ i32 -1 }>, section "mysection" @@ -50,8 +50,8 @@ func bar(x: Int) -> String { return "test" } // CHECK: @"$s15SectionTopLevel13floatLiteral2Sdvp" = {{.*}}constant %TSd <{ double 2.718000e+00 }>, section "mysection" // CHECK: @"$s15SectionTopLevel12boolLiteral1Sbvp" = {{.*}}constant %TSb <{ i1 true }>, section "mysection" // CHECK: @"$s15SectionTopLevel12boolLiteral2Sbvp" = {{.*}}constant %TSb zeroinitializer, section "mysection" -// CHECK: @"$s15SectionTopLevel8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3fooSiyF", ptr null }, section "mysection" -// CHECK: @"$s15SectionTopLevel8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF", ptr null }, section "mysection" -// CHECK: @"$s15SectionTopLevel6tuple1Si_S2iSdSbtvp" = {{.*}}constant <{ %TSi, %TSi, %TSi, %TSd, %TSb }> <{ %TSi <{ i64 1 }>, %TSi <{ i64 2 }>, %TSi <{ i64 3 }>, %TSd <{ double 2.718000e+00 }>, %TSb <{ i1 true }> }>, section "mysection" -// CHECK: @"$s15SectionTopLevel6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ i64 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" -// CHECK: @"$s15SectionTopLevel6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s15SectionTopLevel3fooSiyF", ptr null }, %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF", ptr null } }>, section "mysection" +// CHECK: @"$s15SectionTopLevel8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3fooSiyF{{.*}}", ptr null }, section "mysection" +// CHECK: @"$s15SectionTopLevel8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF{{.*}}", ptr null }, section "mysection" +// CHECK: @"$s15SectionTopLevel6tuple1Si_S2iSdSbtvp" = {{.*}}constant <{ %TSi, %TSi, %TSi, {{.*}} }> <{ %TSi <{ {{i64|i32}} 1 }>, %TSi <{ {{i64|i32}} 2 }>, %TSi <{ {{i64|i32}} 3 }>, {{.*}} }>, section "mysection" +// CHECK: @"$s15SectionTopLevel6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ {i64|i32}} 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" +// CHECK: @"$s15SectionTopLevel6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s15SectionTopLevel3fooSiyF{{.*}}", ptr null }, %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF{{.*}}", ptr null } }>, section "mysection" From f04efab9695ce70322bde10931582c92b29fccd3 Mon Sep 17 00:00:00 2001 From: "Kuba (Brecka) Mracek" Date: Fri, 7 Nov 2025 12:48:04 -0800 Subject: [PATCH 2/2] Fix typo in SectionTopLevel.swift --- test/ConstValues/SectionTopLevel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ConstValues/SectionTopLevel.swift b/test/ConstValues/SectionTopLevel.swift index f061893cb7dc..a18488bc55f6 100644 --- a/test/ConstValues/SectionTopLevel.swift +++ b/test/ConstValues/SectionTopLevel.swift @@ -53,5 +53,5 @@ func bar(x: Int) -> String { return "test" } // CHECK: @"$s15SectionTopLevel8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3fooSiyF{{.*}}", ptr null }, section "mysection" // CHECK: @"$s15SectionTopLevel8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF{{.*}}", ptr null }, section "mysection" // CHECK: @"$s15SectionTopLevel6tuple1Si_S2iSdSbtvp" = {{.*}}constant <{ %TSi, %TSi, %TSi, {{.*}} }> <{ %TSi <{ {{i64|i32}} 1 }>, %TSi <{ {{i64|i32}} 2 }>, %TSi <{ {{i64|i32}} 3 }>, {{.*}} }>, section "mysection" -// CHECK: @"$s15SectionTopLevel6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ {i64|i32}} 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" +// CHECK: @"$s15SectionTopLevel6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ {{i64|i32}} 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" // CHECK: @"$s15SectionTopLevel6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s15SectionTopLevel3fooSiyF{{.*}}", ptr null }, %swift.function { ptr @"$s15SectionTopLevel3bar1xSSSi_tF{{.*}}", ptr null } }>, section "mysection"