From de8231eada12167cc2122ba35ab9b6d8660cdc4c 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 --- llvm/lib/Target/Mips/MipsDSPInstrInfo.td | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llvm/lib/Target/Mips/MipsDSPInstrInfo.td b/llvm/lib/Target/Mips/MipsDSPInstrInfo.td index 556cf6bc5000..b9f40efbd1d5 100644 --- a/llvm/lib/Target/Mips/MipsDSPInstrInfo.td +++ b/llvm/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)), -- GitLab