[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp

Chris Lattner sabre at nondot.org
Mon Mar 19 11:26:18 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

ScalarReplAggregates.cpp updated: 1.79 -> 1.80
---
Log message:

fix ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll


---
Diffs of the changes:  (+2 -1)

 ScalarReplAggregates.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.79 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.80
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.79	Sun Mar 18 19:16:43 2007
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp	Mon Mar 19 13:25:57 2007
@@ -661,7 +661,8 @@
   // up.
   for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
        UI != E; ) {
-    GetElementPtrInst *GEPI = cast<GetElementPtrInst>(*UI++);
+    GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(*UI++);
+    if (!GEPI) continue;
     gep_type_iterator I = gep_type_begin(GEPI);
     ++I;
 






More information about the llvm-commits mailing list