diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-07 22:19:08 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-07 22:19:08 +0000 |
commit | 4ce86f459c92258f887fd8fd884fa55066b3a0cd (patch) | |
tree | feddede9f0aa323e8f373e41a9b325bb21a56885 /lib/CodeGen/SelectionDAG/InstrEmitter.cpp | |
parent | 66797ff2e1433c1005f911c954a2953238d04554 (diff) | |
download | llvm-4ce86f459c92258f887fd8fd884fa55066b3a0cd.tar.gz llvm-4ce86f459c92258f887fd8fd884fa55066b3a0cd.tar.bz2 llvm-4ce86f459c92258f887fd8fd884fa55066b3a0cd.tar.xz |
SDDbgValues are apparently not being legalized. Fix a symptom of the problem,
and not the real problem itself, by dropping debug info for i128 values.
rdar://7958162.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 8f406a8174..0112bc1942 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -583,7 +583,13 @@ InstrEmitter::EmitDbgValue(SDDbgValue *SD, } else if (SD->getKind() == SDDbgValue::CONST) { const Value *V = SD->getConst(); if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) { - MIB.addImm(CI->getSExtValue()); + // FIXME: SDDbgValues aren't updated with legalization, so it's possible + // to have i128 values in them at this point. As a crude workaround, just + // drop the debug info if this happens. + if (!CI->getValue().isSignedIntN(64)) + MIB.addReg(0U); + else + MIB.addImm(CI->getSExtValue()); } else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) { MIB.addFPImm(CF); } else { |