Skip to content

Commit eba3593

Browse files
authored
Merge pull request #83401 from swiftlang/revert-83234-wip-155863017-6.2
Revert "[6.2][Test] Fix IRGen/abi_v7k.swift"
2 parents 369c75b + fe0b2ec commit eba3593

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/IRGen/abi_v7k.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func testData(x: DataCase) -> Double {
9898
// CHECK: [[ID:%[0-9]+]] = phi i32 [ 2, {{.*}} ], [ 1, {{.*}} ]
9999
// CHECK: ret i32 [[ID]]
100100
// V7K-LABEL: _$s8test_v7k0A6Clike2
101-
// V7K: cmp r0, #1
101+
// V7K: tst.w r0, #1
102102
// V7K: movs r0, #1
103103
// V7K: movs r0, #2
104104
enum CLike2 {
@@ -155,8 +155,7 @@ func testClike8(t: Int, x: CLike8) -> Int {
155155
// CHECK: bitcast i64 [[RESULT]] to double
156156
// CHECK: phi double [ 0.000000e+00, {{.*}} ]
157157
// V7K-LABEL: _$s8test_v7k0A7SingleP
158-
// V7K: sxtb [[R0:r[0-9]+]], r2
159-
// V7K: cmp [[R0]], #1
158+
// V7K: tst.w r2, #1
160159
// V7K: vldr d0, [{{.*}}]
161160
enum SinglePayload {
162161
case Paragraph
@@ -213,14 +212,13 @@ func testMultiP(x: MultiPayload) -> Double {
213212

214213
// CHECK-LABEL: define hidden swiftcc float @"$s8test_v7k0A3Opt{{.*}}"(i32 %0, i8 %1)
215214
// CHECK: entry:
216-
// CHECK: [[TR:%.*]] = icmp eq i8 %1, 1
215+
// CHECK: [[TR:%.*]] = trunc i8 %1
217216
// CHECK: br i1 [[TR]], {{.*}}, label %[[PAYLOADLABEL:.*]]
218217
// CHECK: [[PAYLOADLABEL]]:
219218
// CHECK: [[ID:%[0-9]+]] = bitcast i32 %0 to float
220219
// CHECK: ret float
221220
// V7K-LABEL: _$s8test_v7k0A3Opt
222-
// V7K: sxtb [[R0:r[0-9]+]], r1
223-
// V7K: cmp [[R0]], #1
221+
// V7K: tst.w r1, #1
224222
// V7K: vmov s0, r0
225223
// V7K: vstr s0, [sp, [[SLOT:#[0-9]+]]
226224
// V7K: vldr s0, [sp, [[SLOT]]
@@ -310,6 +308,7 @@ func testRet3() -> MyRect2 {
310308
// V7K: str.w {{.*}}, [{{.*}}[[R0_RELOAD]], #12]
311309
// V7K: str {{.*}}, [{{.*}}[[R0_RELOAD]], #16]
312310
// V7K: str {{.*}}, [{{.*}}[[R0_RELOAD]], #20]
311+
// V7K: and {{.*}}, {{.*}}, #1
313312
// V7K: strb {{.*}}, [{{.*}}[[R0_RELOAD]], #24]
314313
func minMax2(x : Int, y : Int) -> (min: Int, max: Int, min2: Int, max2: Int, min3: Int, max3: Int)? {
315314
if x == y {

0 commit comments

Comments
 (0)