[WebAssembly] Fix memory bug introduced in 52861809994c

Authored by tlively on Feb 19 2020, 3:01 PM.


[WebAssembly] Fix memory bug introduced in 52861809994c

The instruction at DefI can sometimes be destroyed by
rematerializeCheapDef, so it should not be used after calling that
function. The fix is to use Insert instead when examining additional
multivalue stackifications. Insert is the address of the new
defining instruction after all moves and rematerializations have taken

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74875