diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-01-30 22:23:15 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-01-30 22:23:15 +0000 |
| commit | c40931856201822e36e0d8a4cc9ade526315b803 (patch) | |
| tree | 86a651d04c5cf0bbb97c2e9af2179340bbe6e4a0 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | cab9a2eef5574e7dc83464b1991c73034909dab5 (diff) | |
| download | bcm5719-llvm-c40931856201822e36e0d8a4cc9ade526315b803.tar.gz bcm5719-llvm-c40931856201822e36e0d8a4cc9ade526315b803.zip | |
Propagate debug loc info for some of the *_EXTEND functions.
llvm-svn: 63434
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index d573476a35d..d3a59b4bf9b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -831,6 +831,14 @@ SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, MVT VT) { getConstant(Imm, Op.getValueType())); } +SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, DebugLoc DL, MVT VT) { + if (Op.getValueType() == VT) return Op; + APInt Imm = APInt::getLowBitsSet(Op.getValueSizeInBits(), + VT.getSizeInBits()); + return getNode(ISD::AND, DL, Op.getValueType(), Op, + getConstant(Imm, Op.getValueType())); +} + /// getNOT - Create a bitwise NOT operation as (XOR Val, -1). /// SDValue SelectionDAG::getNOT(SDValue Val, MVT VT) { |

