[llvm-commits] [llvm] r123771 - in /llvm/trunk: lib/Transforms/Scalar/CodeGenPrepare.cpp test/CodeGen/Generic/crash.ll
Chris Lattner
sabre at nondot.org
Tue Jan 18 12:53:04 PST 2011
Author: lattner
Date: Tue Jan 18 14:53:04 2011
New Revision: 123771
URL: http://llvm.org/viewvc/llvm-project?rev=123771&view=rev
Log:
fix rdar://8878965, a regression I introduced with the recent
llvm.objectsize changes.
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
llvm/trunk/test/CodeGen/Generic/crash.ll
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=123771&r1=123770&r2=123771&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Tue Jan 18 14:53:04 2011
@@ -644,8 +644,10 @@
// If the iterator instruction was recursively deleted, start over at the
// start of the block.
- if (IterHandle != CurInstIterator)
+ if (IterHandle != CurInstIterator) {
CurInstIterator = BB->begin();
+ SunkAddrs.clear();
+ }
return true;
}
Modified: llvm/trunk/test/CodeGen/Generic/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/crash.ll?rev=123771&r1=123770&r2=123771&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/crash.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/crash.ll Tue Jan 18 14:53:04 2011
@@ -6,3 +6,35 @@
@tags = global [1 x %struct.AVCodecTag*] [%struct.AVCodecTag* getelementptr
inbounds ([0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
+
+; rdar://8878965
+
+%struct.CAMERA = type { [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], double, double, i32, double, double, i32, double, i32* }
+
+define void @Parse_Camera(%struct.CAMERA** nocapture %Camera_Ptr) nounwind {
+entry:
+%.pre = load %struct.CAMERA** %Camera_Ptr, align 4
+%0 = getelementptr inbounds %struct.CAMERA* %.pre, i32 0, i32 1, i32 0
+%1 = getelementptr inbounds %struct.CAMERA* %.pre, i32 0, i32 1, i32 2
+br label %bb32
+
+bb32: ; preds = %bb6
+%2 = load double* %0, align 4
+%3 = load double* %1, align 4
+%4 = load double* %0, align 4
+call void @Parse_Vector(double* %0) nounwind
+%5 = call i32 @llvm.objectsize.i32(i8* undef, i1 false)
+%6 = icmp eq i32 %5, -1
+br i1 %6, label %bb34, label %bb33
+
+bb33: ; preds = %bb32
+unreachable
+
+bb34: ; preds = %bb32
+unreachable
+
+}
+
+declare void @Parse_Vector(double*)
+declare i32 @llvm.objectsize.i32(i8*, i1)
+
More information about the llvm-commits
mailing list