mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 05:35:11 +00:00
[mips] Correct MUL pattern for mips64
Guard existing pattern with a predicate, introduce a new one for revision 6. Differential Revision: https://reviews.llvm.org/D51684 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae4ef7d35c
commit
24ab3f138f
@ -838,7 +838,7 @@ def : MipsPat<(i64 (sext (i32 (sub GPR32:$src, GPR32:$src2)))),
|
||||
(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)>;
|
||||
|
@ -301,6 +301,9 @@ def : MipsPat<(select (i32 (seteq i32:$cond, immz)), immz, i64:$f),
|
||||
|
||||
// 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;
|
||||
|
Loading…
Reference in New Issue
Block a user