Skip to content

Commit

Permalink
[X86] Fix instr desc of CFCMOV's 'mr' variants
Browse files Browse the repository at this point in the history
- With the memory operand as the destination, 'mr' variants of CFCMOV
  works like STORE and their memory operands should be input operands
  instead of output ones.

Reviewers: XinWang10, arsenm

Pull Request: #88970
  • Loading branch information
darkbuck committed Apr 16, 2024
1 parent 988ffd0 commit 50a3717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/X86/X86InstrCMovSetCC.td
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ let SchedRW = [WriteCMOV.Folded, WriteCMOV.ReadAfterFold] in {
}
let SchedRW = [WriteCMOV, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault],
Predicates = [HasCMOV, HasCF, In64BitMode], mayStore = 1 in
def mr : ITy<0x40, MRMDestMemCC, t, (outs t.MemOperand:$dst),
(ins t.RegClass:$src1, ccode:$cond),
def mr : ITy<0x40, MRMDestMemCC, t, (outs),
(ins t.MemOperand:$dst, t.RegClass:$src1, ccode:$cond),
"cfcmov${cond}", unaryop_ndd_args, []>, UseEFLAGS, NF;
}

Expand Down

0 comments on commit 50a3717

Please sign in to comment.