|
@@ -4,6 +4,7 @@
|
|
|
// RUN: FileCheck --input-file=%tgen -check-prefix=CHECK -check-prefix=PGOGEN %s
|
|
|
|
|
|
// PGOGEN: @[[SIC:__profc__Z11switch_initv]] = private global [3 x i64] zeroinitializer
|
|
|
+// PGOGEN: @[[IIC:__profc__Z7if_initv]] = private global [3 x i64] zeroinitializer
|
|
|
|
|
|
// Note: We expect counters for the function entry block, the condition in the
|
|
|
// switch initializer, and the switch successor block.
|
|
@@ -15,3 +16,14 @@ void switch_init() {
|
|
|
// PGOGEN: store {{.*}} @[[SIC]], i64 0, i64 2
|
|
|
// PGOGEN: store {{.*}} @[[SIC]], i64 0, i64 1
|
|
|
}
|
|
|
+
|
|
|
+// Note: We expect counters for the function entry block, the condition in the
|
|
|
+// if initializer, and the if successor block.
|
|
|
+//
|
|
|
+// CHECK-LABEL: define {{.*}}void @_Z7if_initv()
|
|
|
+// PGOGEN: store {{.*}} @[[IIC]], i64 0, i64 0
|
|
|
+void if_init() {
|
|
|
+ if (int i = true ? 0 : 1; i) {}
|
|
|
+ // PGOGEN: store {{.*}} @[[IIC]], i64 0, i64 2
|
|
|
+ // PGOGEN: store {{.*}} @[[IIC]], i64 0, i64 1
|
|
|
+}
|