From 05ca83b532a4031ea7a4d15e0cd35048fd4c85b9 Mon Sep 17 00:00:00 2001 From: Kuba Mracek Date: Sat, 25 Oct 2025 12:41:46 -0700 Subject: [PATCH 1/2] Adjust expectations in ConstValues/SectionIR.swift for arm64e --- test/ConstValues/SectionIR.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ConstValues/SectionIR.swift b/test/ConstValues/SectionIR.swift index 731a3a1063f9c..91635ee70f021 100644 --- a/test/ConstValues/SectionIR.swift +++ b/test/ConstValues/SectionIR.swift @@ -54,9 +54,9 @@ func bar(x: Int) -> String { return "test" } // CHECK: @"$s9SectionIR13floatLiteral2Sdvp" = {{.*}}constant %TSd <{ double 2.718000e+00 }>, section "mysection" // CHECK: @"$s9SectionIR12boolLiteral1Sbvp" = {{.*}}constant %TSb <{ i1 true }>, section "mysection" // CHECK: @"$s9SectionIR12boolLiteral2Sbvp" = {{.*}}constant %TSb zeroinitializer, section "mysection" -// CHECK: @"$s9SectionIR8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3fooSiyF", ptr null }, section "mysection" -// CHECK: @"$s9SectionIR8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF", ptr null }, section "mysection" +// CHECK: @"$s9SectionIR8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3fooSiyF{{.*}}", ptr null }, section "mysection" +// CHECK: @"$s9SectionIR8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF{{.*}}", ptr null }, section "mysection" // CHECK: @"$s9SectionIR6tuple1Si_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: @"$s9SectionIR6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ i64 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" -// CHECK: @"$s9SectionIR6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s9SectionIR3fooSiyF", ptr null }, %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF", ptr null } }>, section "mysection" +// CHECK: @"$s9SectionIR6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s9SectionIR3fooSiyF{{.*}}", ptr null }, %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF{{.*}}", ptr null } }>, section "mysection" // CHECK: @"$s9SectionIR11inlineArrays06InlineD0Vy$2_SiGvp" = {{.*}}constant %"Ts11InlineArrayVy$2_SiG" <{ [3 x %TSi] [%TSi <{ i64 1 }>, %TSi <{ i64 2 }>, %TSi <{ i64 3 }>] }>, section "mysection" From ecdcb1be31473ba65a475a59179b385d2011f238 Mon Sep 17 00:00:00 2001 From: Kuba Mracek Date: Sun, 26 Oct 2025 09:59:59 -0700 Subject: [PATCH 2/2] Make ConstValues/SectionIR.swift test compatible with 32-bit platforms --- test/ConstValues/SectionIR.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ConstValues/SectionIR.swift b/test/ConstValues/SectionIR.swift index 91635ee70f021..11e0af5966709 100644 --- a/test/ConstValues/SectionIR.swift +++ b/test/ConstValues/SectionIR.swift @@ -40,12 +40,12 @@ func bar(x: Int) -> String { return "test" } @available(SwiftStdlib 6.2, *) @section("mysection") let inlineArray: InlineArray = [1, 2, 3] // ok -// CHECK: @"$s9SectionIR11intLiteral1Sivp" = {{.*}}constant %TSi <{ i64 42 }>, section "mysection" +// CHECK: @"$s9SectionIR11intLiteral1Sivp" = {{.*}}constant %TSi <{ {{i64|i32}} 42 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral2s4Int8Vvp" = {{.*}}constant %Ts4Int8V <{ i8 127 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral3s5Int16Vvp" = {{.*}}constant %Ts5Int16V <{ i16 32767 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral4s5Int32Vvp" = {{.*}}constant %Ts5Int32V <{ i32 2147483647 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral5s5Int64Vvp" = {{.*}}constant %Ts5Int64V <{ i64 9223372036854775807 }>, section "mysection" -// CHECK: @"$s9SectionIR11intLiteral6Suvp" = {{.*}}constant %TSu <{ i64 42 }>, section "mysection" +// CHECK: @"$s9SectionIR11intLiteral6Suvp" = {{.*}}constant %TSu <{ {{i64|i32}} 42 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral7s5UInt8Vvp" = {{.*}}constant %Ts5UInt8V <{ i8 -1 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral8s6UInt16Vvp" = {{.*}}constant %Ts6UInt16V <{ i16 -1 }>, section "mysection" // CHECK: @"$s9SectionIR11intLiteral9s6UInt32Vvp" = {{.*}}constant %Ts6UInt32V <{ i32 -1 }>, section "mysection" @@ -56,7 +56,7 @@ func bar(x: Int) -> String { return "test" } // CHECK: @"$s9SectionIR12boolLiteral2Sbvp" = {{.*}}constant %TSb zeroinitializer, section "mysection" // CHECK: @"$s9SectionIR8funcRef1Siycvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3fooSiyF{{.*}}", ptr null }, section "mysection" // CHECK: @"$s9SectionIR8funcRef2ySSSicvp" = {{.*}}constant %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF{{.*}}", ptr null }, section "mysection" -// CHECK: @"$s9SectionIR6tuple1Si_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: @"$s9SectionIR6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ i64 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" +// CHECK: @"$s9SectionIR6tuple1Si_S2iSdSbtvp" = {{.*}}constant <{ %TSi, %TSi, %TSi, %TSd, %TSb }> <{ %TSi <{ {{i64|i32}} 1 }>, %TSi <{ {{i64|i32}} 2 }>, %TSi <{ {{i64|i32}} 3 }>, %TSd <{ double 2.718000e+00 }>, %TSb <{ i1 true }> }>, section "mysection" +// CHECK: @"$s9SectionIR6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ {{i64|i32}} 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection" // CHECK: @"$s9SectionIR6tuple3Siyc_SSSictvp" = {{.*}}constant <{ %swift.function, %swift.function }> <{ %swift.function { ptr @"$s9SectionIR3fooSiyF{{.*}}", ptr null }, %swift.function { ptr @"$s9SectionIR3bar1xSSSi_tF{{.*}}", ptr null } }>, section "mysection" -// CHECK: @"$s9SectionIR11inlineArrays06InlineD0Vy$2_SiGvp" = {{.*}}constant %"Ts11InlineArrayVy$2_SiG" <{ [3 x %TSi] [%TSi <{ i64 1 }>, %TSi <{ i64 2 }>, %TSi <{ i64 3 }>] }>, section "mysection" +// CHECK: @"$s9SectionIR11inlineArrays06InlineD0Vy$2_SiGvp" = {{.*}}constant %"Ts11InlineArrayVy$2_SiG" <{ [3 x %TSi] [%TSi <{ {{i64|i32}} 1 }>, %TSi <{ {{i64|i32}} 2 }>, %TSi <{ {{i64|i32}} 3 }>] }>, section "mysection"