mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 21:31:41 +00:00
MIPS DSP: add bitcast patterns between vectors and int.
No test cases. These patterns will get tested along with dsp intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7509ec18d1
commit
7e105bcc3a
@ -23,6 +23,16 @@ def immSExt6 : ImmLeaf<i32, [{return isInt<6>(Imm);}]>;
|
||||
class DSPPat<dag pattern, dag result, Predicate pred = HasDSP> :
|
||||
Pat<pattern, result>, Requires<[pred]>;
|
||||
|
||||
class BitconvertPat<ValueType DstVT, ValueType SrcVT, RegisterClass DstRC,
|
||||
RegisterClass SrcRC> :
|
||||
DSPPat<(DstVT (bitconvert (SrcVT SrcRC:$src))),
|
||||
(COPY_TO_REGCLASS SrcRC:$src, DstRC)>;
|
||||
|
||||
def : BitconvertPat<i32, v2i16, CPURegs, DSPRegs>;
|
||||
def : BitconvertPat<i32, v4i8, CPURegs, DSPRegs>;
|
||||
def : BitconvertPat<v2i16, i32, DSPRegs, CPURegs>;
|
||||
def : BitconvertPat<v4i8, i32, DSPRegs, CPURegs>;
|
||||
|
||||
def : DSPPat<(v2i16 (load addr:$a)),
|
||||
(v2i16 (COPY_TO_REGCLASS (LW addr:$a), DSPRegs))>;
|
||||
def : DSPPat<(v4i8 (load addr:$a)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user