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 | c690002d5a85ab55cd9a4d163ec28f35344f2154 (patch) | |
| tree | feddede9f0aa323e8f373e41a9b325bb21a56885 /lib/CodeGen/SelectionDAG | |
| parent | 2d6d9eafcd5c8dd385fcf17843e9be0860b90e75 (diff) | |
| download | external_llvm-c690002d5a85ab55cd9a4d163ec28f35344f2154.zip external_llvm-c690002d5a85ab55cd9a4d163ec28f35344f2154.tar.gz external_llvm-c690002d5a85ab55cd9a4d163ec28f35344f2154.tar.bz2 | |
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')
| -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 8f406a8..0112bc1 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 { |
