R600: Fix unconditional return in loop

llvm-svn: 361167
This commit is contained in:
Matt Arsenault 2019-05-20 16:22:11 +00:00
parent 9060b6df97
commit 5239298b0d
1 changed files with 5 additions and 10 deletions

View File

@ -56,17 +56,12 @@ using namespace llvm;
#define DEBUG_TYPE "vec-merger"
static bool
isImplicitlyDef(MachineRegisterInfo &MRI, unsigned Reg) {
for (MachineRegisterInfo::def_instr_iterator It = MRI.def_instr_begin(Reg),
E = MRI.def_instr_end(); It != E; ++It) {
return (*It).isImplicitDef();
}
if (MRI.isReserved(Reg)) {
static bool isImplicitlyDef(MachineRegisterInfo &MRI, unsigned Reg) {
assert(MRI.isSSA());
if (TargetRegisterInfo::isPhysicalRegister(Reg))
return false;
}
llvm_unreachable("Reg without a def");
return false;
const MachineInstr *MI = MRI.getUniqueVRegDef(Reg);
return MI && MI->isImplicitDef();
}
namespace {