[jit] Add support for generating the push/pop the LMF from the LMF stack as IR instea...
[mono.git] / mono / mini / ssa.c
index 3b154b455eef8591a8b5946f0c363a6ce3bf702e..d58d814e11fb0685d48c275cc497a968b8ab034a 100644 (file)
@@ -5,6 +5,7 @@
  *    Dietmar Maurer (dietmar@ximian.com)
  *
  * (C) 2003 Ximian, Inc.
+ * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
  */
 #include <config.h>
 #include <string.h>
@@ -1104,7 +1105,7 @@ fold_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst **carray
 
                                /* Unlink target bblocks */
                                for (i = 0; i < table->table_size; ++i) {
-                                       if (i != idx) {
+                                       if (table->table [i] != table->table [idx]) {
                                                remove_bb_from_phis (cfg, bb, table->table [i]);
                                                mono_unlink_bblock (cfg, bb, table->table [i]);
                                        }