Index: lib/Analysis/AliasAnalysis.cpp =================================================================== --- lib/Analysis/AliasAnalysis.cpp +++ lib/Analysis/AliasAnalysis.cpp @@ -445,7 +445,7 @@ unsigned ArgNo = 0; ModRefInfo R = MRI_NoModRef; - for (ImmutableCallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end(); + for (auto CI = CS.data_operands_begin(), CE = CS.data_operands_end(); CI != CE; ++CI, ++ArgNo) { // Only look at the no-capture or byval pointer arguments. If this // pointer were passed to arguments that were neither of these, then it Index: test/CodeGen/X86/statepoint-memdep.ll =================================================================== --- /dev/null +++ test/CodeGen/X86/statepoint-memdep.ll @@ -0,0 +1,16 @@ +; RUN: opt -S -dse < %s 2>&1 | FileCheck %s +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define void @f() { + %s = alloca i64 + ; verify that this first store is not considered killed by the second one + ; since it could be observed from the deopt continuation + ; CHECK: store i64 1, i64* %s + store i64 1, i64* %s + call void @g() [ "deopt"(i64* %s) ] + store i64 0, i64* %s + ret void +} + +declare void @g()