summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 03cd7c10150..78e0fe47be0 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -63,6 +63,7 @@
using namespace llvm;
using namespace reassociate;
+using namespace PatternMatch;
#define DEBUG_TYPE "reassociate"
@@ -125,10 +126,10 @@ XorOpnd::XorOpnd(Value *V) {
Value *V0 = I->getOperand(0);
Value *V1 = I->getOperand(1);
const APInt *C;
- if (match(V0, PatternMatch::m_APInt(C)))
+ if (match(V0, m_APInt(C)))
std::swap(V0, V1);
- if (match(V1, PatternMatch::m_APInt(C))) {
+ if (match(V1, m_APInt(C))) {
ConstPart = *C;
SymbolicPart = V0;
isOr = (I->getOpcode() == Instruction::Or);
@@ -1304,7 +1305,7 @@ Value *ReassociatePass::OptimizeXor(Instruction *I,
Value *V = Ops[i].Op;
const APInt *C;
// TODO: Support non-splat vectors.
- if (match(V, PatternMatch::m_APInt(C))) {
+ if (match(V, m_APInt(C))) {
ConstOpnd ^= *C;
} else {
XorOpnd O(V);
OpenPOWER on IntegriCloud