Skip to content

Commit 56d79aa

Browse files
fixup! swap conditions
1 parent a802de7 commit 56d79aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/utils/TableGen/SubtargetEmitter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,11 +965,11 @@ Record *SubtargetEmitter::FindReadAdvance(const CodeGenSchedRW &SchedRead,
965965
// If there is no AliasDef and we find a match, we can early exit since
966966
// there is no need to verify whether there are resources defined for both
967967
// SchedWrite and its alias.
968-
if (!AliasDef && AliasDef == RA->getValueAsDef("ReadType")) {
968+
if (!AliasDef && SchedRead.TheDef == RA->getValueAsDef("ReadType")) {
969969
ResDef = RA;
970970
break;
971-
}
972-
if (SchedRead.TheDef == RA->getValueAsDef("ReadType")) {
971+
}
972+
if (AliasDef == RA->getValueAsDef("ReadType")) {
973973
if (ResDef) {
974974
PrintFatalError(RA->getLoc(), "Resources are defined for both "
975975
"SchedRead and its alias on processor " +

0 commit comments

Comments
 (0)