Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp =================================================================== --- lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -839,8 +839,7 @@ getAllocaSizeInBytes(&AI) > 0 && // We are only interested in allocas not promotable to registers. // Promotable allocas are common under -O0. - (!ClSkipPromotableAllocas || !isAllocaPromotable(&AI) || - isDynamicAlloca(AI))); + (!ClSkipPromotableAllocas || !isAllocaPromotable(&AI))); ProcessedAllocas[&AI] = IsInteresting; return IsInteresting; Index: test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll =================================================================== --- test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll +++ test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll @@ -3,6 +3,7 @@ ; breaks debug info. ; RUN: opt < %s -asan -asan-module -S | FileCheck %s +; RUN: opt < %s -asan -asan-module -asan-instrument-allocas=1 -S | FileCheck %s target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.10.0"