From 8857822452c758805e8bb33ecc877d8d0cce1660 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 30 May 2020 16:12:44 -0700 Subject: [PATCH] [X86] Move MMX_SET0 pattern into the instruction definition. NFC --- llvm/lib/Target/X86/X86InstrMMX.td | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/X86/X86InstrMMX.td b/llvm/lib/Target/X86/X86InstrMMX.td index 83eddaa..415e038 100644 --- a/llvm/lib/Target/X86/X86InstrMMX.td +++ b/llvm/lib/Target/X86/X86InstrMMX.td @@ -24,8 +24,9 @@ // We set canFoldAsLoad because this can be converted to a constant-pool // load of an all-zeros value if folding it would be beneficial. let isReMaterializable = 1, isAsCheapAsAMove = 1, canFoldAsLoad = 1, - isPseudo = 1, SchedRW = [WriteZero] in { -def MMX_SET0 : I<0, Pseudo, (outs VR64:$dst), (ins), "", []>; + isPseudo = 1, SchedRW = [WriteZero], Predicates = [HasMMX] in { +def MMX_SET0 : I<0, Pseudo, (outs VR64:$dst), (ins), "", + [(set VR64:$dst, (x86mmx (MMX_X86movw2d (i32 0))))]>; } let Constraints = "$src1 = $dst" in { @@ -172,11 +173,6 @@ def MMX_MOVD64rm : MMXI<0x6E, MRMSrcMem, (outs VR64:$dst), (ins i32mem:$src), (x86mmx (MMX_X86movw2d (loadi32 addr:$src))))]>, Sched<[WriteVecLoad]>; -let Predicates = [HasMMX] in { - def : Pat<(x86mmx (MMX_X86movw2d (i32 0))), - (MMX_SET0)>; -} - let mayStore = 1 in def MMX_MOVD64mr : MMXI<0x7E, MRMDestMem, (outs), (ins i32mem:$dst, VR64:$src), "movd\t{$src, $dst|$dst, $src}", []>, -- 2.7.4