Skip to content

Fix an overspecific lit check: unsafebufferpointer.swift. #22568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions test/SILOptimizer/unsafebufferpointer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ public func testCount(_ x: UnsafeBufferPointer<UInt>) -> Int {
//
// CHECK: ; <label>:[[LOOP]]:
// CHECK: phi float [ 0.000000e+00
// CHECK: add nuw i64 %{{.*}}, 1
// CHECK: load float, float*
// CHECK: fadd float
// CHECK: [[CMP:%[0-9]+]] = icmp eq i64 %{{.*}}, %{{.*}}
// CHECK: [[CMP:%[0-9]+]] = icmp eq
// CHECK: br i1 [[CMP]], label %.loopexit, label %[[LOOP]]
public func testSubscript(_ ubp: UnsafeBufferPointer<Float>) -> Float {
var sum: Float = 0
Expand All @@ -80,12 +79,10 @@ public func testSubscript(_ ubp: UnsafeBufferPointer<Float>) -> Float {
//
// CHECK: ; <label>:[[LOOP]]:
// CHECK: phi i64 [ 0
// CHECK: phi i64 [ 0
// CHECK: add nuw i64 %{{.*}}, 1
// CHECK: load i8, i8*
// CHECK: zext i8 %{{.*}} to i64
// CHECK: add i64
// CHECK: [[CMP:%[0-9]+]] = icmp eq i64 %{{.*}}, %{{.*}}
// CHECK: [[CMP:%[0-9]+]] = icmp eq
// CHECK: br i1 [[CMP]], label %[[RET]], label %[[LOOP]]
public func testSubscript(_ ubp: UnsafeRawBufferPointer) -> Int64 {
var sum: Int64 = 0
Expand Down