diff options
author | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2018-12-25 14:42:30 +0000 |
---|---|---|
committer | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2018-12-25 14:42:30 +0000 |
commit | 09dff3334931052cfd0dab9dd5ae23bee6be1406 (patch) | |
tree | b9d774be99a4aeb40dae4743889113f2545534db /llvm/lib/Target/Mips/MipsInstructionSelector.cpp | |
parent | 9b25bf396041a4e9e13d5e3a2f336c7868236999 (diff) | |
download | bcm5719-llvm-09dff3334931052cfd0dab9dd5ae23bee6be1406.tar.gz bcm5719-llvm-09dff3334931052cfd0dab9dd5ae23bee6be1406.zip |
[MIPS GlobalISel] Select G_SELECT
Add widen scalar for type index 1 (i1 condition) for G_SELECT.
Select G_SELECT for pointer, s32(integer) and smaller low level
types on MIPS32.
Differential Revision: https://reviews.llvm.org/D56001
llvm-svn: 350063
Diffstat (limited to 'llvm/lib/Target/Mips/MipsInstructionSelector.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsInstructionSelector.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstructionSelector.cpp b/llvm/lib/Target/Mips/MipsInstructionSelector.cpp index 4964ca9cbe1..b041590ee34 100644 --- a/llvm/lib/Target/Mips/MipsInstructionSelector.cpp +++ b/llvm/lib/Target/Mips/MipsInstructionSelector.cpp @@ -172,6 +172,15 @@ bool MipsInstructionSelector::select(MachineInstr &I, I.eraseFromParent(); return true; } + case G_SELECT: { + // Handle operands with pointer type. + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MOVN_I_I)) + .add(I.getOperand(0)) + .add(I.getOperand(2)) + .add(I.getOperand(1)) + .add(I.getOperand(3)); + break; + } case G_CONSTANT: { int Imm = I.getOperand(1).getCImm()->getValue().getLimitedValue(); unsigned LUiReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); |