diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 9c2856f24a42..685b082a435c 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -392,6 +392,7 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM) setOperationAction(ISD::UDIV, VT, Expand); setOperationAction(ISD::UREM, VT, Expand); setOperationAction(ISD::FDIV, VT, Expand); + setOperationAction(ISD::FREM, VT, Expand); setOperationAction(ISD::FNEG, VT, Expand); setOperationAction(ISD::FSQRT, VT, Expand); setOperationAction(ISD::FLOG, VT, Expand); diff --git a/llvm/test/CodeGen/PowerPC/vector.ll b/llvm/test/CodeGen/PowerPC/vector.ll index e4c3b0db1726..859a85a14101 100644 --- a/llvm/test/CodeGen/PowerPC/vector.ll +++ b/llvm/test/CodeGen/PowerPC/vector.ll @@ -59,6 +59,14 @@ define void @test_div(%f8* %P, %f8* %Q, %f8* %S) { ret void } +define void @test_rem(%f8* %P, %f8* %Q, %f8* %S) { + %p = load %f8* %P ; <%f8> [#uses=1] + %q = load %f8* %Q ; <%f8> [#uses=1] + %R = frem %f8 %p, %q ; <%f8> [#uses=1] + store %f8 %R, %f8* %S + ret void +} + ;;; TEST VECTOR CONSTRUCTS define void @test_cst(%f4* %P, %f4* %S) {