mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 14:40:25 +00:00
Hook up support for fast-isel of trunc instructions, using the newly working support for EXTRACT_SUBREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b5dbcb538b
commit
c0bb68b982
@ -366,6 +366,9 @@ FastISel::SelectInstructions(BasicBlock::iterator Begin,
|
||||
case Instruction::SExt:
|
||||
if (!SelectCast(I, ISD::SIGN_EXTEND, ValueMap)) return I;
|
||||
break;
|
||||
case Instruction::Trunc:
|
||||
if (!SelectCast(I, ISD::TRUNCATE, ValueMap)) return I;
|
||||
break;
|
||||
case Instruction::SIToFP:
|
||||
if (!SelectCast(I, ISD::SINT_TO_FP, ValueMap)) return I;
|
||||
break;
|
||||
@ -594,6 +597,6 @@ unsigned FastISel::FastEmitInst_extractsubreg(unsigned Op0, uint32_t Idx) {
|
||||
unsigned ResultReg = createResultReg(SRC);
|
||||
const TargetInstrDesc &II = TII.get(TargetInstrInfo::EXTRACT_SUBREG);
|
||||
|
||||
BuildMI(MBB, II, ResultReg).addReg(Op0);
|
||||
BuildMI(MBB, II, ResultReg).addReg(Op0).addImm(Idx);
|
||||
return ResultReg;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user