the operand of a bitcast is always the right size, just emit it in place.
authorChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:14:13 +0000 (05:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:14:13 +0000 (05:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32470 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index a9e94a01f7dcb448c99b06830ae41b2a16491222..db70e2d6148b377a0be77eb0bcd381648fd8da3f 100644 (file)
@@ -434,9 +434,11 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
     case Instruction::FPToSI:
       assert(0 && "FIXME: Don't yet support this kind of constant cast expr");
       break;
+    case Instruction::BitCast:
+      return EmitConstantValueOnly(CE->getOperand(0));
+
     case Instruction::IntToPtr:
-    case Instruction::PtrToInt:
-    case Instruction::BitCast: {
+    case Instruction::PtrToInt:{
       // Support only foldable casts to/from pointers that can be eliminated by
       // changing the pointer to the appropriately sized integer type.
       Constant *Op = CE->getOperand(0);