Eric Christopher | cee313d | 2019-04-17 04:52:47 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -instrprof -S -o - -do-counter-promotion=1 | FileCheck %s |
| 2 | ; CHECK: store |
| 3 | |
| 4 | @__profn_foo = private constant [3 x i8] c"foo" |
| 5 | |
| 6 | define void @foo() { |
| 7 | entry: |
| 8 | br label %while.body |
| 9 | |
| 10 | while.body: ; preds = %entry, %while.body |
| 11 | call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_foo, i32 0, i32 0), i64 14813359968, i32 1, i32 0) |
| 12 | call void (...) @bar() #2 |
| 13 | br label %while.body |
| 14 | } |
| 15 | |
| 16 | declare void @bar(...) |
| 17 | |
| 18 | declare void @llvm.instrprof.increment(i8*, i64, i32, i32) #0 |
| 19 | |
| 20 | attributes #0 = { nounwind } |
| 21 | |