[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Reid Spencer
reid at x10sys.com
Wed Nov 1 17:54:31 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.313 -> 1.314
---
Log message:
For PR950: http://llvm.org/PR950 :
Replace the REM instruction with UREM, SREM and FREM.
---
Diffs of the changes: (+4 -8)
SelectionDAGISel.cpp | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.313 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.314
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.313 Wed Nov 1 19:41:49 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Nov 1 19:53:58 2006
@@ -528,16 +528,12 @@
else
visitIntBinary(I, ISD::MUL, ISD::VMUL);
}
+ void visitURem(User &I) { visitIntBinary(I, ISD::UREM, 0); }
+ void visitSRem(User &I) { visitIntBinary(I, ISD::SREM, 0); }
+ void visitFRem(User &I) { visitFPBinary (I, ISD::FREM, 0); }
void visitUDiv(User &I) { visitIntBinary(I, ISD::UDIV, ISD::VUDIV); }
void visitSDiv(User &I) { visitIntBinary(I, ISD::SDIV, ISD::VSDIV); }
- void visitFDiv(User &I) { visitFPBinary(I, ISD::FDIV, ISD::VSDIV); }
- void visitRem(User &I) {
- const Type *Ty = I.getType();
- if (Ty->isFloatingPoint())
- visitFPBinary(I, ISD::FREM, 0);
- else
- visitIntBinary(I, Ty->isSigned() ? ISD::SREM : ISD::UREM, 0);
- }
+ void visitFDiv(User &I) { visitFPBinary (I, ISD::FDIV, ISD::VSDIV); }
void visitAnd(User &I) { visitIntBinary(I, ISD::AND, ISD::VAND); }
void visitOr (User &I) { visitIntBinary(I, ISD::OR, ISD::VOR); }
void visitXor(User &I) { visitIntBinary(I, ISD::XOR, ISD::VXOR); }
More information about the llvm-commits
mailing list