| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
| ; RUN: opt < %s -passes=instrumentor -instrumentor-read-config-files=%S/counters_config.json -S | FileCheck %s |
| |
| target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" |
| |
| define i32 @foo() { |
| ; CHECK-LABEL: define i32 @foo() { |
| ; CHECK-NEXT: [[ENTRY:.*:]] |
| ; CHECK-NEXT: [[TMP1:%.*]] = alloca i32, align 4 |
| ; CHECK-NEXT: call void @__instrumentor_pre_store() #[[ATTR0:[0-9]+]] |
| ; CHECK-NEXT: store i32 0, ptr [[TMP1]], align 4 |
| ; CHECK-NEXT: call void @__instrumentor_post_store(i32 -1) #[[ATTR0]] |
| ; CHECK-NEXT: call void @__instrumentor_pre_load(i32 2) #[[ATTR0]] |
| ; CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4 |
| ; CHECK-NEXT: call void @__instrumentor_post_load(i32 -2) #[[ATTR0]] |
| ; CHECK-NEXT: ret i32 [[TMP2]] |
| ; |
| entry: |
| %0 = alloca i32, align 4 |
| store i32 0, ptr %0, align 4 |
| %2 = load i32, ptr %0, align 4 |
| ret i32 %2 |
| } |