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 | 085b207e3dd5ceb2810bb4a07d718a1cb7bac39c (patch) | |
| tree | d7aae8cc81383bb00ec6ca36e8fea06aeadd3be1 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | 4b8dd44da84e0c9d7a130073c73fbefb5d3b0a10 (diff) | |
| download | external_llvm-085b207e3dd5ceb2810bb4a07d718a1cb7bac39c.zip external_llvm-085b207e3dd5ceb2810bb4a07d718a1cb7bac39c.tar.gz external_llvm-085b207e3dd5ceb2810bb4a07d718a1cb7bac39c.tar.bz2 | |
Propagate debug loc info for some of the *_EXTEND functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index d573476..d3a59b4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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) { |
