summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-01-22 17:39:32 +0000
committerBob Wilson <bob.wilson@apple.com>2009-01-22 17:39:32 +0000
commitc58900504bd56fe25b953d49be491da249f0b76a (patch)
tree1ecb7dc560398fd374737c9c90d1c058fc3af4d1 /llvm/lib/Target/X86/X86ISelLowering.cpp
parentb2e6ca7ff3633d99909da5268afeb76dd4212400 (diff)
downloadbcm5719-llvm-c58900504bd56fe25b953d49be491da249f0b76a.tar.gz
bcm5719-llvm-c58900504bd56fe25b953d49be491da249f0b76a.zip
Add SelectionDAG::getNOT method to construct bitwise NOT operations,
corresponding to the "not" and "vnot" PatFrags. Use the new method in some places where it seems appropriate. llvm-svn: 62768
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c59e9cd7723..a2ae6095f50 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -5253,14 +5253,9 @@ SDValue X86TargetLowering::LowerVSETCC(SDValue Op, SelectionDAG &DAG) {
SDValue Result = DAG.getNode(Opc, VT, Op0, Op1);
// If the logical-not of the result is required, perform that now.
- if (Invert) {
- MVT EltVT = VT.getVectorElementType();
- SDValue NegOne = DAG.getConstant(EltVT.getIntegerVTBitMask(), EltVT);
- std::vector<SDValue> NegOnes(VT.getVectorNumElements(), NegOne);
- SDValue NegOneV = DAG.getNode(ISD::BUILD_VECTOR, VT, &NegOnes[0],
- NegOnes.size());
- Result = DAG.getNode(ISD::XOR, VT, Result, NegOneV);
- }
+ if (Invert)
+ Result = DAG.getNOT(Result, VT);
+
return Result;
}
OpenPOWER on IntegriCloud