[PATCH] D49469: [mips] Fix predicate for the MipsTruncIntFP pattern
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 03:27:08 PDT 2018
atanasyan created this revision.
atanasyan added reviewers: smaksimovic, abeserminji, mstojanovic.
Herald added subscribers: jrtc27, arichardson, sdardis.
This is a follow-up to the https://reviews.llvm.org/rL337171. This patch fixes regression introduced by the r337171 and enables MipsTruncIntFP pattern.
Repository:
rL LLVM
https://reviews.llvm.org/D49469
Files:
lib/Target/Mips/MipsInstrFPU.td
test/CodeGen/Mips/double2int.ll
Index: test/CodeGen/Mips/double2int.ll
===================================================================
--- test/CodeGen/Mips/double2int.ll
+++ test/CodeGen/Mips/double2int.ll
@@ -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:
Index: lib/Target/Mips/MipsInstrFPU.td
===================================================================
--- lib/Target/Mips/MipsInstrFPU.td
+++ lib/Target/Mips/MipsInstrFPU.td
@@ -894,7 +894,7 @@
(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),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49469.156028.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/9c0900c3/attachment.bin>
More information about the llvm-commits
mailing list