From c7d2ce7047d7cb026c3198e6760415ed673b00f7 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 10 Jul 2009 17:35:01 +0000 Subject: Push LLVMContext through the PatternMatch API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75255 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/AddrModeMatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Transforms/Utils/AddrModeMatcher.cpp') diff --git a/lib/Transforms/Utils/AddrModeMatcher.cpp b/lib/Transforms/Utils/AddrModeMatcher.cpp index 71049fa212..7a2bf8587b 100644 --- a/lib/Transforms/Utils/AddrModeMatcher.cpp +++ b/lib/Transforms/Utils/AddrModeMatcher.cpp @@ -96,7 +96,8 @@ bool AddressingModeMatcher::MatchScaledValue(Value *ScaleReg, int64_t Scale, // X*Scale + C*Scale to addr mode. ConstantInt *CI = 0; Value *AddLHS = 0; if (isa(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; -- cgit v1.2.3