From 882f4d03f621a32d0075a086250ffd5b236f5773 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Thu, 27 Sep 2012 01:56:38 +0000 Subject: [PATCH] MIPS DSP: add bitcast patterns between vectors and int. No test cases. These patterns will get tested along with dsp intrinsics. llvm-svn: 164746 --- lib/Target/Mips/MipsDSPInstrInfo.td | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Target/Mips/MipsDSPInstrInfo.td b/lib/Target/Mips/MipsDSPInstrInfo.td index 556cf6bc500..b9f40efbd1d 100644 --- a/lib/Target/Mips/MipsDSPInstrInfo.td +++ b/lib/Target/Mips/MipsDSPInstrInfo.td @@ -23,6 +23,16 @@ def immSExt6 : ImmLeaf(Imm);}]>; class DSPPat : Pat, Requires<[pred]>; +class BitconvertPat : + DSPPat<(DstVT (bitconvert (SrcVT SrcRC:$src))), + (COPY_TO_REGCLASS SrcRC:$src, DstRC)>; + +def : BitconvertPat; +def : BitconvertPat; +def : BitconvertPat; +def : BitconvertPat; + def : DSPPat<(v2i16 (load addr:$a)), (v2i16 (COPY_TO_REGCLASS (LW addr:$a), DSPRegs))>; def : DSPPat<(v4i8 (load addr:$a)),