[mips][FastISel] Clobber HI0/LO0 registers in MUL instructions.
authorVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Mon, 1 Jun 2015 15:48:09 +0000 (15:48 +0000)
committerVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Mon, 1 Jun 2015 15:48:09 +0000 (15:48 +0000)
commit7f680e156ed553a07e2b1779ec5a8f745f5fb1e3
tree2c7abc1372342eedc714d50957717cde25bf5aee
parent743d1a7a698fce5c1b9e1e89a1816695098a593b
[mips][FastISel] Clobber HI0/LO0 registers in MUL instructions.

Summary:
The contents of the HI/LO registers are unpredictable after the execution of
the MUL instruction. In addition to implicitly defining these registers in the
MUL instruction definition, we have to mark those registers as dead too.

Without this the fast register allocator is running out of registers when the
MUL instruction is followed by another one that tries to allocate the AC0
register.

Based on a patch by Reed Kotler.

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

Differential Revision: http://reviews.llvm.org/D9825

llvm-svn: 238755
llvm/lib/Target/Mips/MipsFastISel.cpp
llvm/test/CodeGen/Mips/Fast-ISel/mul1.ll [new file with mode: 0644]