[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Mon Dec 11 21:14:28 PST 2006
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.122 -> 1.123
---
Log message:
the operand of a bitcast is always the right size, just emit it in place.
---
Diffs of the changes: (+4 -2)
AsmPrinter.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.122 llvm/lib/CodeGen/AsmPrinter.cpp:1.123
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.122 Mon Dec 11 19:32:02 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp Mon Dec 11 23:14:13 2006
@@ -434,9 +434,11 @@
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);
More information about the llvm-commits
mailing list