diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-01-22 17:39:32 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-01-22 17:39:32 +0000 |
commit | c58900504bd56fe25b953d49be491da249f0b76a (patch) | |
tree | 1ecb7dc560398fd374737c9c90d1c058fc3af4d1 /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | b2e6ca7ff3633d99909da5268afeb76dd4212400 (diff) | |
download | bcm5719-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.cpp | 11 |
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; } |