11; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
22; RUN: opt -S -passes=partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
33
4- define float @f (float %val ) {
4+ define float @f (float %val ) !prof !0 {
55; CHECK-LABEL: @f(
66; CHECK-NEXT: entry:
77; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0:[0-9]+]]
88; CHECK-NEXT: [[TMP0:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
9- ; CHECK-NEXT: br i1 [[TMP0]], label [[ENTRY_SPLIT:%.*]], label [[CALL_SQRT:%.*]]
9+ ; CHECK-NEXT: br i1 [[TMP0]], label [[ENTRY_SPLIT:%.*]], label [[CALL_SQRT:%.*]], !prof [[PROF1:![0-9]+]]
1010; CHECK: call.sqrt:
1111; CHECK-NEXT: [[TMP1:%.*]] = tail call float @sqrtf(float [[VAL]])
1212; CHECK-NEXT: br label [[ENTRY_SPLIT]]
@@ -19,11 +19,11 @@ entry:
1919 ret float %res
2020}
2121
22- define float @f_writeonly (float %val ) {
22+ define float @f_writeonly (float %val ) !prof !0 {
2323; CHECK-LABEL: @f_writeonly(
2424; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0]]
2525; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
26- ; CHECK-NEXT: br i1 [[TMP1]], label [[DOTSPLIT:%.*]], label [[CALL_SQRT:%.*]]
26+ ; CHECK-NEXT: br i1 [[TMP1]], label [[DOTSPLIT:%.*]], label [[CALL_SQRT:%.*]], !prof [[PROF1]]
2727; CHECK: call.sqrt:
2828; CHECK-NEXT: [[TMP2:%.*]] = tail call float @sqrtf(float [[VAL]]) #[[ATTR1:[0-9]+]]
2929; CHECK-NEXT: br label [[DOTSPLIT]]
@@ -45,8 +45,13 @@ define float @f_readonly(float %val) {
4545}
4646
4747declare float @sqrtf (float )
48+
49+ !0 = !{!"function_entry_count" , i32 10 }
4850;.
4951; CHECK: attributes #[[ATTR0]] = { memory(none) }
5052; CHECK: attributes #[[ATTR1]] = { memory(write) }
5153; CHECK: attributes #[[ATTR2]] = { memory(read) }
5254;.
55+ ; CHECK: [[META0:![0-9]+]] = !{!"function_entry_count", i32 10}
56+ ; CHECK: [[PROF1]] = !{!"branch_weights", i32 1048575, i32 1}
57+ ;.
0 commit comments