From bce22b48fee6a0b0295cc18c7994f3a515e63398 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 7 Nov 2011 18:57:41 +0000 Subject: [PATCH] Add 64-bit to 32-bit trunc pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143988 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/Mips64InstrInfo.td | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Target/Mips/Mips64InstrInfo.td b/lib/Target/Mips/Mips64InstrInfo.td index 05470d5a4d4..3708c4a3627 100644 --- a/lib/Target/Mips/Mips64InstrInfo.td +++ b/lib/Target/Mips/Mips64InstrInfo.td @@ -172,3 +172,8 @@ defm : SetlePats; defm : SetgtPats; defm : SetgePats; defm : SetgeImmPats; + +// truncate +def : Pat<(i32 (trunc CPU64Regs:$src)), + (SLL (EXTRACT_SUBREG CPU64Regs:$src, sub_32), 0)>, Requires<[IsN64]>; +