mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
LLVM r356789 changed the format of textual IR to print nameless blocks with labels instead of comments with "; <label>". Adjust Swift tests to match. I also updated the utils/viewcfg script to match.
20 lines
846 B
Swift
20 lines
846 B
Swift
// RUN: %target-swift-frontend -g -emit-ir %s | %FileCheck %s
|
|
// FIXME: This test should be testing a non-shadow-copied value instead.
|
|
for i in 0 ..< 3 {
|
|
// CHECK: %[[ALLOCA:[0-9]+]] = alloca %TSiSg
|
|
// CHECK: %i.debug = alloca i{{32|64}}
|
|
// CHECK-NEXT: call void @llvm.dbg.declare(metadata i{{32|64}}* %i.debug,
|
|
// CHECK-SAME: metadata ![[I:[0-9]+]],
|
|
// CHECK: call swiftcc{{.*}} @{{.*}}next{{.*}}
|
|
// CHECK: %[[LD:[0-9]+]] = load i{{32|64}}, i{{32|64}}*
|
|
// CHECK: br i1 {{%.*}}, label %[[FAIL:.*]], label %[[SUCCESS:.*]],
|
|
//
|
|
// CHECK: [[SUCCESS]]:
|
|
// CHECK: br label %[[NEXT_BB:.*]],
|
|
//
|
|
// CHECK: [[NEXT_BB]]:
|
|
// CHECK: %[[PHI_VAL:.*]] = phi i{{32|64}} [ %[[LD]], %[[SUCCESS]] ]
|
|
// CHECK: store i{{32|64}} %[[PHI_VAL]], i{{32|64}}* %i.debug
|
|
// CHECK: ![[I]] = !DILocalVariable(name: "i",
|
|
}
|