Merge pull request #3066 from alexanderkyte/pedump_sgen
[mono.git] / mono / mini / local-propagation.c
index 32cd496f30f19b43817bfef49cfe95f27a2d5a08..a35a7a39f21405c92b2b9602205116099f4b7852 100644 (file)
@@ -183,6 +183,8 @@ mono_strength_reduction_ins (MonoCompile *cfg, MonoInst *ins, const char **spec)
        }
 #if SIZEOF_REGISTER == 4
        case OP_LSHR_IMM: {
+               if (COMPILE_LLVM (cfg))
+                       break;
                if (ins->inst_c1 == 32) {
                        MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, MONO_LVREG_LS (ins->dreg), MONO_LVREG_MS (ins->sreg1));
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, MONO_LVREG_MS (ins->dreg), MONO_LVREG_MS (ins->sreg1), 31);
@@ -203,6 +205,8 @@ mono_strength_reduction_ins (MonoCompile *cfg, MonoInst *ins, const char **spec)
                break;
        }
        case OP_LSHR_UN_IMM: {
+               if (COMPILE_LLVM (cfg))
+                       break;
                if (ins->inst_c1 == 32) {
                        MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, MONO_LVREG_LS (ins->dreg), MONO_LVREG_MS (ins->sreg1));
                        MONO_EMIT_NEW_ICONST (cfg, MONO_LVREG_MS (ins->dreg), 0);
@@ -223,6 +227,8 @@ mono_strength_reduction_ins (MonoCompile *cfg, MonoInst *ins, const char **spec)
                break;
        }
        case OP_LSHL_IMM: {
+               if (COMPILE_LLVM (cfg))
+                       break;
                if (ins->inst_c1 == 32) {
                        /* just move the lower half to the upper and zero the lower word */
                        MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, MONO_LVREG_MS (ins->dreg), MONO_LVREG_LS (ins->sreg1));
@@ -549,13 +555,13 @@ mono_local_cprop (MonoCompile *cfg)
                                        ins->inst_destbasereg = def->sreg1;
                                        ins->inst_offset += def->inst_imm;
                                }
+
+                               if (!MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
+                                       defs [ins->dreg] = ins;
+                                       def_index [ins->dreg] = ins_index;
+                               }
                        }
                        
-                       if ((spec [MONO_INST_DEST] != ' ') && !MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
-                               defs [ins->dreg] = ins;
-                               def_index [ins->dreg] = ins_index;
-                       }
-
                        if (MONO_IS_CALL (ins))
                                last_call_index = ins_index;