Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Show First 20 Lines • Show All 2,557 Lines • ▼ Show 20 Lines | if (!Visited.insert(P).second) | ||||
continue; | continue; | ||||
// Only handle instructions with one def. | // Only handle instructions with one def. | ||||
if (MI->getNumExplicitDefs() != 1) | if (MI->getNumExplicitDefs() != 1) | ||||
return false; | return false; | ||||
for (auto &UserOp : MRI.use_operands(MI->getOperand(0).getReg())) { | for (auto &UserOp : MRI.use_operands(MI->getOperand(0).getReg())) { | ||||
const MachineInstr *UserMI = UserOp.getParent(); | const MachineInstr *UserMI = UserOp.getParent(); | ||||
unsigned OpIdx = UserMI->getOperandNo(&UserOp); | unsigned OpIdx = UserOp.getOperandNo(); | ||||
switch (UserMI->getOpcode()) { | switch (UserMI->getOpcode()) { | ||||
default: | default: | ||||
return false; | return false; | ||||
case RISCV::ADDIW: | case RISCV::ADDIW: | ||||
case RISCV::ADDW: | case RISCV::ADDW: | ||||
case RISCV::DIVUW: | case RISCV::DIVUW: | ||||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |