[llvm] Fix a case where we treated the dreg of a store_membase instruction as a dreg...
authorZoltan Varga <vargaz@gmail.com>
Fri, 1 Nov 2019 07:43:42 +0000 (03:43 -0400)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2019 07:43:42 +0000 (03:43 -0400)
Commit migrated from https://github.com/mono/mono/commit/dc8d55d4462216db4c3cb5f9eb3167fc6b746575

src/mono/mono/mini/mini-llvm.c

index d762cda..98b30cd 100644 (file)
@@ -5981,7 +5981,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                                 * compilation will fail.
                                 */
                                const char *spec = INS_INFO (next->opcode);
-                               if (spec [MONO_INST_DEST] == 'i')
+                               if (spec [MONO_INST_DEST] == 'i' && !MONO_IS_STORE_MEMBASE (next))
                                        ctx->values [next->dreg] = LLVMConstNull (LLVMInt32Type ());
                                MONO_DELETE_INS (bb, next);
                        }