the operand of a bitcast is always the right size, just emit it in place.
llvm-svn: 32470
This commit is contained in:
parent
b341b0861d
commit
b9e41f5559
|
|
@ -434,9 +434,11 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
|
||||||
case Instruction::FPToSI:
|
case Instruction::FPToSI:
|
||||||
assert(0 && "FIXME: Don't yet support this kind of constant cast expr");
|
assert(0 && "FIXME: Don't yet support this kind of constant cast expr");
|
||||||
break;
|
break;
|
||||||
|
case Instruction::BitCast:
|
||||||
|
return EmitConstantValueOnly(CE->getOperand(0));
|
||||||
|
|
||||||
case Instruction::IntToPtr:
|
case Instruction::IntToPtr:
|
||||||
case Instruction::PtrToInt:
|
case Instruction::PtrToInt:{
|
||||||
case Instruction::BitCast: {
|
|
||||||
// Support only foldable casts to/from pointers that can be eliminated by
|
// Support only foldable casts to/from pointers that can be eliminated by
|
||||||
// changing the pointer to the appropriately sized integer type.
|
// changing the pointer to the appropriately sized integer type.
|
||||||
Constant *Op = CE->getOperand(0);
|
Constant *Op = CE->getOperand(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue