[PATCH] D58715: [MIPS GlobalISel] Fix mul operands
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 01:44:20 PST 2019
Petar.Avramovic updated this revision to Diff 189454.
Petar.Avramovic added a comment.
`selectImpl` in some cases deletes `I` (using `eraseFromParent()`) and creates new instruction that is inserted in place of `I` in machine basic block.
In such cases `I.getOpcode()` accesses memory that was freed and can return unpredictable value.
For that reason we now select G_MUL manually before call to selectImpl.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58715/new/
https://reviews.llvm.org/D58715
Files:
lib/Target/Mips/MipsInstructionSelector.cpp
test/CodeGen/Mips/GlobalISel/instruction-select/mul.mir
test/CodeGen/Mips/GlobalISel/legalizer/mul.mir
test/CodeGen/Mips/GlobalISel/llvm-ir/mul.ll
test/CodeGen/Mips/GlobalISel/regbankselect/mul.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58715.189454.patch
Type: text/x-patch
Size: 10014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/ff83ba6d/attachment.bin>
More information about the llvm-commits
mailing list