Fix MachineLICM to use the correct virtual register class when
authorDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 22:18:41 +0000 (22:18 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 22:18:41 +0000 (22:18 +0000)
commit0115e164bad632572e2cfbaf72f0f0882d5319de
treee1e3d79537c4854d8ab8a456330534a5fe807054
parent287db0c23c9188c563cc2ff449733f233535496e
Fix MachineLICM to use the correct virtual register class when
unfolding loads for hoisting.  getOpcodeAfterMemoryUnfold returns the
opcode of the original operation without the load, not the load
itself, MachineLICM needs to know the operand index in order to get
the correct register class. Extend getOpcodeAfterMemoryUnfold to
return this information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85622 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/MachineLICM.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
test/CodeGen/X86/sink-hoist.ll