1; RUN: opt < %s -asan -asan-module -asan-instrument-allocas=1 -S | FileCheck %s
2
3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.10.0"
5
6define i32 @test_promotable_allocas() sanitize_address {
7entry:
8; CHECK: %0 = alloca i32, align 4
9; CHECK: store i32 0, i32* %0, align 4
10; CHECK: %1 = load i32, i32* %0, align 4
11; CHECK: ret i32 %1
12
13; CHECK-NOT: __asan_stack_malloc_0
14; CHECK-NOT: icmp
15; CHECK-NOT: call void @__asan_report_store4
16
17  %0 = alloca i32, align 4
18  store i32 0, i32* %0, align 4
19  %1 = load i32, i32* %0, align 4
20  ret i32 %1
21}
22