OSDN Git Service

[WebAssembly] Fix operand rewriting in inline asm lowering.
authorDan Gohman <dan433584@gmail.com>
Tue, 4 Sep 2018 17:46:12 +0000 (17:46 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 4 Sep 2018 17:46:12 +0000 (17:46 +0000)
commitb9587f4923b86ee2b359a2babaf180a4af844195
treebb88d4defe2ef5a131510c683a46c866b7178202
parentc38c85037ddf1b82145320836a8e63e0ec592c5d
[WebAssembly] Fix operand rewriting in inline asm lowering.

Use MachineOperand::ChangeToImmediate rather than reassigning
MachineOperands to new values created from MachineOperand::CreateImm,
so that their parent pointers are preserved.

This fixes "Instruction has operand with wrong parent set" errors
reported by the MachineVerifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341389 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
test/CodeGen/WebAssembly/inline-asm.ll