From c985d828bc4cf63348b74a8a9fbd8c1b6809dbb0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 25 Mar 2006 23:00:08 +0000 Subject: [PATCH] add a vnot helper node for matching 'not' on vectors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27132 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetSelectionDAG.td | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index 3856009bd29..0cf0bfea413 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -379,13 +379,17 @@ class PatLeaf // 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. -- 2.34.1