Skip to content

Commit e14ef7e

Browse files
committed
Check all overlaps when looking for used registers.
A function using any RC alias is enough to enable the ExeDepsFix pass. llvm-svn: 144636
1 parent ab9ebd3 commit e14ef7e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Diff for: llvm/lib/CodeGen/ExecutionDepsFix.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,11 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
650650
bool anyregs = false;
651651
for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
652652
I != E; ++I)
653-
if (MF->getRegInfo().isPhysRegUsed(*I)) {
654-
anyregs = true;
655-
break;
656-
}
653+
for (const unsigned *AI = TRI->getOverlaps(*I); *AI; ++AI)
654+
if (MF->getRegInfo().isPhysRegUsed(*AI)) {
655+
anyregs = true;
656+
break;
657+
}
657658
if (!anyregs) return false;
658659

659660
// Initialize the AliasMap on the first use.

0 commit comments

Comments
 (0)