Push LLVMContext through the PatternMatch API.
llvm-svn: 75255
diff --git a/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp b/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp
index 71049fa..7a2bf85 100644
--- a/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp
+++ b/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp
@@ -96,7 +96,8 @@
// X*Scale + C*Scale to addr mode.
ConstantInt *CI = 0; Value *AddLHS = 0;
if (isa<Instruction>(ScaleReg) && // not a constant expr.
- match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)))) {
+ match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)),
+ *MemoryInst->getParent()->getContext())) {
TestAddrMode.ScaledReg = AddLHS;
TestAddrMode.BaseOffs += CI->getSExtValue()*TestAddrMode.Scale;