From: Akira Hatanaka Date: Mon, 7 Nov 2011 18:57:41 +0000 (+0000) Subject: Add 64-bit to 32-bit trunc pattern. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bce22b48fee6a0b0295cc18c7994f3a515e63398;p=oota-llvm.git 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 --- 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]>; +