Add missing patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-05-22 18:56:56 +00:00
parent b074f80d8e
commit c36c0ab44b
2 changed files with 20 additions and 0 deletions

View File

@ -2351,6 +2351,12 @@ def MOVZDI2PDIrm : PDI<0x6E, MRMSrcMem, (outs VR128:$dst), (ins i32mem:$src),
[(set VR128:$dst, [(set VR128:$dst,
(v4i32 (X86vzmovl (v4i32 (scalar_to_vector (v4i32 (X86vzmovl (v4i32 (scalar_to_vector
(loadi32 addr:$src))))))]>; (loadi32 addr:$src))))))]>;
def : Pat<(v4i32 (X86vzmovl (loadv4i32 addr:$src))),
(MOVZDI2PDIrm addr:$src)>;
def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv4f32 addr:$src)))),
(MOVZDI2PDIrm addr:$src)>;
def MOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src), def MOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src),
"movq\t{$src, $dst|$dst, $src}", "movq\t{$src, $dst|$dst, $src}",
[(set VR128:$dst, [(set VR128:$dst,
@ -2358,6 +2364,10 @@ def MOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src),
(loadi64 addr:$src))))))]>, XS, (loadi64 addr:$src))))))]>, XS,
Requires<[HasSSE2]>; Requires<[HasSSE2]>;
def : Pat<(v2i64 (X86vzmovl (loadv2i64 addr:$src))),
(MOVZQI2PQIrm addr:$src)>;
def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4f32 addr:$src)))),
(MOVZQI2PQIrm addr:$src)>;
def : Pat<(v2i64 (X86vzload addr:$src)), (MOVZQI2PQIrm addr:$src)>; def : Pat<(v2i64 (X86vzload addr:$src)), (MOVZQI2PQIrm addr:$src)>;
} }

View File

@ -0,0 +1,10 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movd
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep xorp
define void @t1() nounwind {
%tmp298.i.i = load <4 x float>* null, align 16
%tmp304.i.i = bitcast <4 x float> %tmp298.i.i to <4 x i32>
%tmp305.i.i = and <4 x i32> %tmp304.i.i, < i32 -1, i32 0, i32 0, i32 0 >
store <4 x i32> %tmp305.i.i, <4 x i32>* null, align 16
unreachable
}