[PATCH] D51684: [mips] Correct MUL pattern for mips64

Stefan Maksimovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 23:29:23 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342946: [mips] Correct MUL pattern for mips64 (authored by smaksimovic, committed by ).
Herald added a subscriber: jrtc27.

Changed prior to commit:
  https://reviews.llvm.org/D51684?vs=164035&id=166815#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51684

Files:
  llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
  llvm/trunk/lib/Target/Mips/Mips64r6InstrInfo.td


Index: llvm/trunk/lib/Target/Mips/Mips64r6InstrInfo.td
===================================================================
--- llvm/trunk/lib/Target/Mips/Mips64r6InstrInfo.td
+++ llvm/trunk/lib/Target/Mips/Mips64r6InstrInfo.td
@@ -301,6 +301,9 @@
 
 // Patterns used for matching away redundant sign extensions.
 // MIPS32 arithmetic instructions sign extend their result implicitly.
+def : MipsPat<(i64 (sext (i32 (mul GPR32:$src, GPR32:$src2)))),
+              (INSERT_SUBREG (i64 (IMPLICIT_DEF)),
+              (MUL_R6 GPR32:$src, GPR32:$src2), sub_32)>, ISA_MIPS64R6;
 def : MipsPat<(i64 (sext (i32 (sdiv GPR32:$src, GPR32:$src2)))),
               (INSERT_SUBREG (i64 (IMPLICIT_DEF)),
               (DIV GPR32:$src, GPR32:$src2), sub_32)>, ISA_MIPS64R6;
Index: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
===================================================================
--- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
+++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
@@ -838,7 +838,7 @@
               (SUBu GPR32:$src, GPR32:$src2), sub_32)>;
 def : MipsPat<(i64 (sext (i32 (mul GPR32:$src, GPR32:$src2)))),
               (INSERT_SUBREG (i64 (IMPLICIT_DEF)),
-              (MUL GPR32:$src, GPR32:$src2), sub_32)>;
+              (MUL GPR32:$src, GPR32:$src2), sub_32)>, ISA_MIPS3_NOT_32R6_64R6;
 def : MipsPat<(i64 (sext (i32 (MipsMFHI ACC64:$src)))),
               (INSERT_SUBREG (i64 (IMPLICIT_DEF)),
               (PseudoMFHI ACC64:$src), sub_32)>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51684.166815.patch
Type: text/x-patch
Size: 1473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180925/ab832cce/attachment.bin>


More information about the llvm-commits mailing list