[llvm] r337392 - [mips] Fix predicate for the MipsTruncIntFP pattern
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 07:11:23 PDT 2018
Author: atanasyan
Date: Wed Jul 18 07:11:22 2018
New Revision: 337392
URL: http://llvm.org/viewvc/llvm-project?rev=337392&view=rev
Log:
[mips] Fix predicate for the MipsTruncIntFP pattern
This is a follow-up to the rL337171. This patch fixes regression
introduced by the r337171 and enables MipsTruncIntFP pattern.
Differential revision: https://reviews.llvm.org/D49469
Modified:
llvm/trunk/lib/Target/Mips/MipsInstrFPU.td
llvm/trunk/test/CodeGen/Mips/double2int.ll
Modified: llvm/trunk/lib/Target/Mips/MipsInstrFPU.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrFPU.td?rev=337392&r1=337391&r2=337392&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrFPU.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrFPU.td Wed Jul 18 07:11:22 2018
@@ -894,7 +894,7 @@ def : MipsPat<(f64 (sint_to_fp GPR64Opnd
(PseudoCVT_D64_L GPR64Opnd:$src)>, FGR_64;
def : MipsPat<(MipsTruncIntFP FGR64Opnd:$src),
- (TRUNC_W_D64 FGR64Opnd:$src)>, ISA_MIPS3, FGR_64;
+ (TRUNC_W_D64 FGR64Opnd:$src)>, ISA_MIPS2, FGR_64;
def : MipsPat<(MipsTruncIntFP FGR32Opnd:$src),
(TRUNC_L_S FGR32Opnd:$src)>, ISA_MIPS2, FGR_64;
def : MipsPat<(MipsTruncIntFP FGR64Opnd:$src),
Modified: llvm/trunk/test/CodeGen/Mips/double2int.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/double2int.ll?rev=337392&r1=337391&r2=337392&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/double2int.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/double2int.ll Wed Jul 18 07:11:22 2018
@@ -1,4 +1,5 @@
-; RUN: llc -march=mips < %s | FileCheck %s
+; RUN: llc -march=mips -mcpu=mips32 < %s | FileCheck %s
+; RUN: llc -march=mips -mcpu=mips32r6 < %s | FileCheck %s
define i32 @f1(double %d) nounwind readnone {
entry:
More information about the llvm-commits
mailing list