mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
DebugLoc form of getNOT().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -379,6 +379,7 @@ public:
|
|||||||
|
|
||||||
/// getNOT - Create a bitwise NOT operation as (XOR Val, -1).
|
/// getNOT - Create a bitwise NOT operation as (XOR Val, -1).
|
||||||
SDValue getNOT(SDValue Val, MVT VT);
|
SDValue getNOT(SDValue Val, MVT VT);
|
||||||
|
SDValue getNOT(DebugLoc DL, SDValue Val, MVT VT);
|
||||||
|
|
||||||
/// getCALLSEQ_START - Return a new CALLSEQ_START node, which always must have
|
/// getCALLSEQ_START - Return a new CALLSEQ_START node, which always must have
|
||||||
/// a flag result (to ensure it's not CSE'd).
|
/// a flag result (to ensure it's not CSE'd).
|
||||||
|
@ -846,6 +846,23 @@ SDValue SelectionDAG::getNOT(SDValue Val, MVT VT) {
|
|||||||
return getNode(ISD::XOR, VT, Val, NegOne);
|
return getNode(ISD::XOR, VT, Val, NegOne);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getNOT - Create a bitwise NOT operation as (XOR Val, -1).
|
||||||
|
///
|
||||||
|
SDValue SelectionDAG::getNOT(DebugLoc DL, SDValue Val, MVT VT) {
|
||||||
|
SDValue NegOne;
|
||||||
|
if (VT.isVector()) {
|
||||||
|
MVT EltVT = VT.getVectorElementType();
|
||||||
|
SDValue NegOneElt = getConstant(EltVT.getIntegerVTBitMask(), EltVT);
|
||||||
|
std::vector<SDValue> NegOnes(VT.getVectorNumElements(), NegOneElt);
|
||||||
|
NegOne = getNode(ISD::BUILD_VECTOR, DebugLoc::getUnknownLoc(), VT,
|
||||||
|
&NegOnes[0], NegOnes.size());
|
||||||
|
} else {
|
||||||
|
NegOne = getConstant(VT.getIntegerVTBitMask(), VT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return getNode(ISD::XOR, DL, VT, Val, NegOne);
|
||||||
|
}
|
||||||
|
|
||||||
SDValue SelectionDAG::getConstant(uint64_t Val, MVT VT, bool isT) {
|
SDValue SelectionDAG::getConstant(uint64_t Val, MVT VT, bool isT) {
|
||||||
MVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT;
|
MVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT;
|
||||||
assert((EltVT.getSizeInBits() >= 64 ||
|
assert((EltVT.getSizeInBits() >= 64 ||
|
||||||
|
Reference in New Issue
Block a user