summaryrefslogtreecommitdiff
path: root/test/profile/Inputs/comdat_rename_2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/profile/Inputs/comdat_rename_2.cc')
-rw-r--r--test/profile/Inputs/comdat_rename_2.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/profile/Inputs/comdat_rename_2.cc b/test/profile/Inputs/comdat_rename_2.cc
new file mode 100644
index 0000000000000..5cad79c9f9d8b
--- /dev/null
+++ b/test/profile/Inputs/comdat_rename_2.cc
@@ -0,0 +1,18 @@
+#include "comdat_rename.h"
+extern void test(FOO *);
+FOO foo;
+int main() {
+ test(&foo);
+ foo.caller(20);
+ return 0;
+}
+
+// The copy of 'caller' defined in this module -- it has
+// 'callee' call remaining.
+//
+// CHECK-LABEL: define {{.*}}caller{{.*}}
+// CHECK: {{.*}} call {{.*}}
+// CHECK-NOT: br i1 {{.*}}
+// CHECK: br {{.*}}label %[[BB1:.*]], label{{.*}}!prof ![[PD1:[0-9]+]]
+// CHECK: {{.*}}[[BB1]]:
+// CHECK:![[PD1]] = !{!"branch_weights", i32 0, i32 1}