[PATCH] D24660: [Sparc][LEON] Erratum fix to replace broken SDIV instruction with SDIVcc.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 12:53:10 PDT 2016


efriedma added a comment.

HasLeonSdivReplace doesn't actually work the way you want it to: division gets selected manually in SparcDAGToDAGISel::Select (https://github.com/llvm-mirror/llvm/blob/master/lib/Target/Sparc/SparcISelDAGToDAG.cpp#L362), not through a pattern, so the predicate has no effect.

Actually, you should be able to substitute in the correct opcode at that point, instead of fixing up the MachineInstr later.


Repository:
  rL LLVM

https://reviews.llvm.org/D24660





More information about the llvm-commits mailing list