diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-03-19 16:12:48 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-03-19 16:12:48 +0000 |
commit | 7f2d17331c7ecbdf171eb4557dd8c0edcab8d392 (patch) | |
tree | 835c4267fe35322fb49300ce83c697b21dae4f48 /llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | |
parent | 531e275aa8f3de18e3ecb0b88704965d14c78f85 (diff) | |
download | bcm5719-llvm-7f2d17331c7ecbdf171eb4557dd8c0edcab8d392.tar.gz bcm5719-llvm-7f2d17331c7ecbdf171eb4557dd8c0edcab8d392.zip |
[GlobalISel] Move method definition to the proper file. NFC.
llvm-svn: 298221
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp index c1e4a8661a2..0ca4134a577 100644 --- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp @@ -177,22 +177,3 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) { // FIXME: Should we accurately track changes? return true; } - -bool InstructionSelector::isOperandImmEqual( - const MachineOperand &MO, int64_t Value, - const MachineRegisterInfo &MRI) const { - // TODO: We should also test isImm() and isCImm() too but this isn't required - // until a DAGCombine equivalent is implemented. - - if (MO.isReg()) { - MachineInstr *Def = MRI.getVRegDef(MO.getReg()); - if (Def->getOpcode() != TargetOpcode::G_CONSTANT) - return false; - assert(Def->getOperand(1).isCImm() && - "G_CONSTANT values must be constants"); - const ConstantInt &Imm = *Def->getOperand(1).getCImm(); - return Imm.getBitWidth() <= 64 && Imm.getSExtValue() == Value; - } - - return false; -} |