add a vnot helper node for matching 'not' on vectors
llvm-svn: 27132
This commit is contained in:
parent
f6e3b957b8
commit
3de9286e09
|
@ -379,13 +379,17 @@ class PatLeaf<dag frag, code pred = [{}], SDNodeXForm xform = NOOP_SDNodeXForm>
|
|||
|
||||
// Leaf fragments.
|
||||
|
||||
def immAllOnes : PatLeaf<(imm), [{ return N->isAllOnesValue(); }]>;
|
||||
def vtInt : PatLeaf<(vt), [{ return MVT::isInteger(N->getVT()); }]>;
|
||||
def vtFP : PatLeaf<(vt), [{ return MVT::isFloatingPoint(N->getVT()); }]>;
|
||||
|
||||
// Other helper fragments.
|
||||
def immAllOnes : PatLeaf<(imm), [{ return N->isAllOnesValue(); }]>;
|
||||
def immAllOnesV: PatLeaf<(build_vector), [{
|
||||
return ISD::isBuildVectorAllOnesInteger(N);
|
||||
}]>;
|
||||
|
||||
// Other helper fragments.
|
||||
def not : PatFrag<(ops node:$in), (xor node:$in, immAllOnes)>;
|
||||
def vnot : PatFrag<(ops node:$in), (xor node:$in, immAllOnesV)>;
|
||||
def ineg : PatFrag<(ops node:$in), (sub 0, node:$in)>;
|
||||
|
||||
// extending load & truncstore fragments.
|
||||
|
|
Loading…
Reference in New Issue