Skip to content

Commit 5474b1f

Browse files
authored
Revert "[MIPS] match llvm.{min,max}num with {min,max}.fmt for R6 (#89021)"
This reverts commit 7152194.
1 parent 7d9634e commit 5474b1f

File tree

4 files changed

+186
-395
lines changed

4 files changed

+186
-395
lines changed

llvm/lib/Target/Mips/Mips32r6InstrInfo.td

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,22 +1117,6 @@ def : MipsPat<(select i32:$cond, immz, i32:$f),
11171117
ISA_MIPS32R6;
11181118
}
11191119

1120-
// llvm.fmin/fmax operations.
1121-
let AdditionalPredicates = [NotInMicroMips] in {
1122-
def : MipsPat<(fmaxnum f32:$lhs, f32:$rhs),
1123-
(MAX_S f32:$lhs, f32:$rhs)>,
1124-
ISA_MIPS32R6;
1125-
def : MipsPat<(fmaxnum f64:$lhs, f64:$rhs),
1126-
(MAX_D f64:$lhs, f64:$rhs)>,
1127-
ISA_MIPS32R6;
1128-
def : MipsPat<(fminnum f32:$lhs, f32:$rhs),
1129-
(MIN_S f32:$lhs, f32:$rhs)>,
1130-
ISA_MIPS32R6;
1131-
def : MipsPat<(fminnum f64:$lhs, f64:$rhs),
1132-
(MIN_D f64:$lhs, f64:$rhs)>,
1133-
ISA_MIPS32R6;
1134-
}
1135-
11361120
// Pseudo instructions
11371121
let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, hasDelaySlot = 1,
11381122
hasExtraSrcRegAllocReq = 1, isCTI = 1, Defs = [AT], hasPostISelHook = 1 in {

llvm/lib/Target/Mips/MipsISelLowering.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,6 @@ MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM,
358358
setOperationAction(ISD::FCOPYSIGN, MVT::f64, Custom);
359359
setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom);
360360

361-
// Lower fmin and fmax operations for MIPS R6.
362-
// Instructions are defined but never used.
363-
if (Subtarget.hasMips32r6() || Subtarget.hasMips64r6()) {
364-
setOperationAction(ISD::FMINNUM, MVT::f32, Legal);
365-
setOperationAction(ISD::FMINNUM, MVT::f64, Legal);
366-
setOperationAction(ISD::FMAXNUM, MVT::f32, Legal);
367-
setOperationAction(ISD::FMAXNUM, MVT::f64, Legal);
368-
}
369-
370361
if (Subtarget.isGP64bit()) {
371362
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
372363
setOperationAction(ISD::BlockAddress, MVT::i64, Custom);

llvm/test/CodeGen/Mips/mipsr6-minmaxnum.ll

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)