diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-10 17:35:01 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-10 17:35:01 +0000 |
commit | 16e7674f4b092b773d44e6232edc714d844ed830 (patch) | |
tree | e259d0912ec6d065ef3b53ee65dd2cab536c06fb /llvm/lib/Transforms/Utils/AddrModeMatcher.cpp | |
parent | 81cdd21dcbcf80659b5b9bb92b5e96edb9727915 (diff) | |
download | llvm-16e7674f4b092b773d44e6232edc714d844ed830.zip llvm-16e7674f4b092b773d44e6232edc714d844ed830.tar.gz llvm-16e7674f4b092b773d44e6232edc714d844ed830.tar.bz2 |
Push LLVMContext through the PatternMatch API.
llvm-svn: 75255
Diffstat (limited to 'llvm/lib/Transforms/Utils/AddrModeMatcher.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/AddrModeMatcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ bool AddressingModeMatcher::MatchScaledValue(Value *ScaleReg, int64_t Scale, // 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; |