[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Feb 24 12:45:31 PST 2005
Changes in directory llvm-poolalloc/lib/PoolAllocate:
PointerCompress.cpp updated: 1.24 -> 1.25
---
Log message:
Fix crash handling 'store P, null'
---
Diffs of the changes: (+5 -2)
PointerCompress.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.24 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.25
--- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.24 Thu Feb 24 13:35:56 2005
+++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Thu Feb 24 14:45:16 2005
@@ -641,8 +641,11 @@
void InstructionRewriter::visitStoreInst(StoreInst &SI) {
const CompressedPoolInfo *DestPI = getPoolInfo(SI.getOperand(1));
if (DestPI == 0) {
- assert(getPoolInfo(SI.getOperand(0)) == 0 &&
- "Cannot store a compressed pointer into non-compressed memory!");
+ if (isa<ConstantPointerNull>(SI.getOperand(1)))
+ SI.eraseFromParent();
+ else
+ assert(getPoolInfo(SI.getOperand(0)) == 0 &&
+ "Cannot store a compressed pointer into non-compressed memory!");
return;
}
More information about the llvm-commits
mailing list