summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.cpp2
-rw-r--r--llvm/test/CodeGen/Mips/frem.ll13
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index eb0e8aefaba..9cba6884458 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -208,6 +208,8 @@ MipsTargetLowering(MipsTargetMachine &TM)
setOperationAction(ISD::FEXP, MVT::f32, Expand);
setOperationAction(ISD::FMA, MVT::f32, Expand);
setOperationAction(ISD::FMA, MVT::f64, Expand);
+ setOperationAction(ISD::FREM, MVT::f32, Expand);
+ setOperationAction(ISD::FREM, MVT::f64, Expand);
setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand);
setOperationAction(ISD::EXCEPTIONADDR, MVT::i64, Expand);
diff --git a/llvm/test/CodeGen/Mips/frem.ll b/llvm/test/CodeGen/Mips/frem.ll
new file mode 100644
index 00000000000..be222b2d917
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/frem.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=mipsel
+
+define float @fmods(float %x, float %y) {
+entry:
+ %r = frem float %x, %y
+ ret float %r
+}
+
+define double @fmodd(double %x, double %y) {
+entry:
+ %r = frem double %x, %y
+ ret double %r
+}
OpenPOWER on IntegriCloud