1 ; Make sure we don't break the IR when moving non-instrumented allocas
3 ; RUN: opt < %s -passes=asan -asan-use-stack-safety=1 -S | FileCheck %s
4 ; RUN: opt < %s -passes=asan -asan-use-stack-safety=1 -asan-instrument-dynamic-allocas -S | FileCheck %s
6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
7 target triple = "x86_64-apple-macosx10.10.0"
9 define i32 @foo(i64 %i) sanitize_address {
11 %non_instrumented1 = alloca i32, align 4
12 %t = load i32, ptr %non_instrumented1, align 4
13 %instrumented = alloca [2 x i32], align 4
14 %ai = getelementptr inbounds [2 x i32], ptr %instrumented, i64 0, i64 %i
15 store volatile i8 0, ptr %ai, align 4
20 ; CHECK: %non_instrumented1 = alloca i32, align 4
21 ; CHECK: load i32, ptr %non_instrumented1
22 ; CHECK: load i32, ptr @__asan_option_detect_stack_use_after_return