File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1110,13 +1110,12 @@ int GCNHazardRecognizer::checkInlineAsmHazards(MachineInstr *IA) {
1110
1110
const MachineOperand *Dst = getDstSelForwardingOperand (MI, ST);
1111
1111
// Assume inline asm reads the dst
1112
1112
if (Dst)
1113
- return true ;
1113
+ return IA-> modifiesRegister (Dst-> getReg (), &TRI) || IA-> readsRegister (Dst-> getReg (), &TRI) ;
1114
1114
1115
1115
if (MI.isInlineAsm ()) {
1116
1116
// If MI is inline asm, assume it has dst forwarding hazard
1117
- for (auto &Op :
1118
- drop_begin (MI.operands (), InlineAsm::MIOp_FirstOperand)) {
1119
- if (Op.isReg () && IA->modifiesRegister (Op.getReg (), &TRI)) {
1117
+ for (auto &Def : MI.all_defs ()) {
1118
+ if (IA->modifiesRegister (Def.getReg (), &TRI) || IA->readsRegister (Def.getReg (), &TRI)) {
1120
1119
return true ;
1121
1120
}
1122
1121
}
You can’t perform that action at this time.
0 commit comments