Skip to content

Commit f4dae2d

Browse files
authored
Merge pull request #22517 from atrick/fix-ubp-test
Fix a unit test for 32-bit platforms.
2 parents 3f54a46 + a07311f commit f4dae2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/SILOptimizer/unsafebufferpointer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ public func testSubscript(_ ubp: UnsafeBufferPointer<Float>) -> Float {
8787
// CHECK: add i64
8888
// CHECK: [[CMP:%[0-9]+]] = icmp eq i64 %{{.*}}, %{{.*}}
8989
// CHECK: br i1 [[CMP]], label %[[RET]], label %[[LOOP]]
90-
public func testSubscript(_ ubp: UnsafeRawBufferPointer) -> Int {
91-
var sum: Int = 0
90+
public func testSubscript(_ ubp: UnsafeRawBufferPointer) -> Int64 {
91+
var sum: Int64 = 0
9292
for i in 0 ..< ubp.count {
93-
sum &+= Int(ubp[i])
93+
sum &+= Int64(ubp[i])
9494
}
9595
return sum
9696
}

0 commit comments

Comments
 (0)