Use patterns to remove some duplicate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-01-05 06:55:48 +00:00
parent 6a69266fed
commit adb7d3b49b
2 changed files with 7 additions and 11 deletions

View File

@ -4879,14 +4879,12 @@ def MOVPQI2QImr : S2I<0xD6, MRMDestMem, (outs), (ins i64mem:$dst, VR128:$src),
//===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===//
// Store / copy lower 64-bits of a XMM register. // Store / copy lower 64-bits of a XMM register.
// //
def VMOVLQ128mr : VS2I<0xD6, MRMDestMem, (outs), (ins i64mem:$dst, VR128:$src), let Predicates = [UseAVX] in
"movq\t{$src, $dst|$dst, $src}", def : Pat<(int_x86_sse2_storel_dq addr:$dst, VR128:$src),
[(int_x86_sse2_storel_dq addr:$dst, VR128:$src)]>, VEX, (VMOVPQI2QImr addr:$dst, VR128:$src)>;
Sched<[WriteStore]>; let Predicates = [UseSSE2] in
def MOVLQ128mr : S2I<0xD6, MRMDestMem, (outs), (ins i64mem:$dst, VR128:$src), def : Pat<(int_x86_sse2_storel_dq addr:$dst, VR128:$src),
"movq\t{$src, $dst|$dst, $src}", (MOVPQI2QImr addr:$dst, VR128:$src)>;
[(int_x86_sse2_storel_dq addr:$dst, VR128:$src)],
IIC_SSE_MOVDQ>, Sched<[WriteStore]>;
let isCodeGenOnly = 1, AddedComplexity = 20 in { let isCodeGenOnly = 1, AddedComplexity = 20 in {
def VMOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src), def VMOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src),

View File

@ -509,9 +509,7 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const {
// Special cases. // Special cases.
if (Name == "MOVPQI2QImr" || if (Name == "VMASKMOVDQU64")
Name == "VMOVPQI2QImr" ||
Name == "VMASKMOVDQU64")
return FILTER_WEAK; return FILTER_WEAK;
// XACQUIRE and XRELEASE reuse REPNE and REP respectively. // XACQUIRE and XRELEASE reuse REPNE and REP respectively.