annotate lib/Target/X86/X86InstrVecCompiler.td @ 148:63bd29f05246

merged
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 19:46:37 +0900
parents c2174574ed3a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 //===- X86InstrVecCompiler.td - Vector Compiler Patterns ---*- tablegen -*-===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 //
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 // This file describes the various vector pseudo instructions used by the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 // compiler, as well as Pat patterns used during instruction selection.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 // Non-instruction patterns
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
18 let Predicates = [NoAVX512] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
19 // A vector extract of the first f32/f64 position is a subregister copy
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
20 def : Pat<(f32 (extractelt (v4f32 VR128:$src), (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
21 (COPY_TO_REGCLASS (v4f32 VR128:$src), FR32)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
22 def : Pat<(f64 (extractelt (v2f64 VR128:$src), (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
23 (COPY_TO_REGCLASS (v2f64 VR128:$src), FR64)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
24 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
25
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
26 let Predicates = [HasAVX512] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
27 // A vector extract of the first f32/f64 position is a subregister copy
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
28 def : Pat<(f32 (extractelt (v4f32 VR128X:$src), (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
29 (COPY_TO_REGCLASS (v4f32 VR128X:$src), FR32X)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
30 def : Pat<(f64 (extractelt (v2f64 VR128X:$src), (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
31 (COPY_TO_REGCLASS (v2f64 VR128X:$src), FR64X)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
32 }
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
34 let Predicates = [NoVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
35 // Implicitly promote a 32-bit scalar to a vector.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
36 def : Pat<(v4f32 (scalar_to_vector FR32:$src)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
37 (COPY_TO_REGCLASS FR32:$src, VR128)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
38 // Implicitly promote a 64-bit scalar to a vector.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
39 def : Pat<(v2f64 (scalar_to_vector FR64:$src)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
40 (COPY_TO_REGCLASS FR64:$src, VR128)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
41 }
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
43 let Predicates = [HasVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
44 // Implicitly promote a 32-bit scalar to a vector.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
45 def : Pat<(v4f32 (scalar_to_vector FR32X:$src)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
46 (COPY_TO_REGCLASS FR32X:$src, VR128X)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
47 // Implicitly promote a 64-bit scalar to a vector.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
48 def : Pat<(v2f64 (scalar_to_vector FR64X:$src)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
49 (COPY_TO_REGCLASS FR64X:$src, VR128X)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
50 }
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 // Subvector tricks
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 // Patterns for insert_subvector/extract_subvector to/from index=0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57 multiclass subvector_subreg_lowering<RegisterClass subRC, ValueType subVT,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 RegisterClass RC, ValueType VT,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 SubRegIndex subIdx> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60 def : Pat<(subVT (extract_subvector (VT RC:$src), (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 (subVT (EXTRACT_SUBREG RC:$src, subIdx))>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63 def : Pat<(VT (insert_subvector undef, subRC:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 (VT (INSERT_SUBREG (IMPLICIT_DEF), subRC:$src, subIdx))>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67 // A 128-bit subvector extract from the first 256-bit vector position is a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 // subregister copy that needs no instruction. Likewise, a 128-bit subvector
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69 // insert to the first 256-bit vector position is a subregister copy that needs
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70 // no instruction.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 defm : subvector_subreg_lowering<VR128, v4i32, VR256, v8i32, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 defm : subvector_subreg_lowering<VR128, v4f32, VR256, v8f32, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 defm : subvector_subreg_lowering<VR128, v2i64, VR256, v4i64, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74 defm : subvector_subreg_lowering<VR128, v2f64, VR256, v4f64, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75 defm : subvector_subreg_lowering<VR128, v8i16, VR256, v16i16, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76 defm : subvector_subreg_lowering<VR128, v16i8, VR256, v32i8, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78 // A 128-bit subvector extract from the first 512-bit vector position is a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 // subregister copy that needs no instruction. Likewise, a 128-bit subvector
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 // insert to the first 512-bit vector position is a subregister copy that needs
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81 // no instruction.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82 defm : subvector_subreg_lowering<VR128, v4i32, VR512, v16i32, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83 defm : subvector_subreg_lowering<VR128, v4f32, VR512, v16f32, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 defm : subvector_subreg_lowering<VR128, v2i64, VR512, v8i64, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
85 defm : subvector_subreg_lowering<VR128, v2f64, VR512, v8f64, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
86 defm : subvector_subreg_lowering<VR128, v8i16, VR512, v32i16, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
87 defm : subvector_subreg_lowering<VR128, v16i8, VR512, v64i8, sub_xmm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
88
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
89 // A 128-bit subvector extract from the first 512-bit vector position is a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
90 // subregister copy that needs no instruction. Likewise, a 128-bit subvector
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
91 // insert to the first 512-bit vector position is a subregister copy that needs
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
92 // no instruction.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
93 defm : subvector_subreg_lowering<VR256, v8i32, VR512, v16i32, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
94 defm : subvector_subreg_lowering<VR256, v8f32, VR512, v16f32, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
95 defm : subvector_subreg_lowering<VR256, v4i64, VR512, v8i64, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
96 defm : subvector_subreg_lowering<VR256, v4f64, VR512, v8f64, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
97 defm : subvector_subreg_lowering<VR256, v16i16, VR512, v32i16, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
98 defm : subvector_subreg_lowering<VR256, v32i8, VR512, v64i8, sub_ymm>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
99
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
100
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
101 // If we're inserting into an all zeros vector, just use a plain move which
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
102 // will zero the upper bits. A post-isel hook will take care of removing
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
103 // any moves that we can prove are unnecessary.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
104 multiclass subvec_zero_lowering<string MoveStr,
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
105 RegisterClass RC, ValueType DstTy,
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
106 ValueType SrcTy, ValueType ZeroTy,
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
107 SubRegIndex SubIdx> {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
108 def : Pat<(DstTy (insert_subvector immAllZerosV,
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
109 (SrcTy RC:$src), (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
110 (SUBREG_TO_REG (i64 0),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
111 (SrcTy (!cast<Instruction>("VMOV"#MoveStr#"rr") RC:$src)), SubIdx)>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
112 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
113
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
114 let Predicates = [HasAVX, NoVLX] in {
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
115 defm : subvec_zero_lowering<"APD", VR128, v4f64, v2f64, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
116 defm : subvec_zero_lowering<"APS", VR128, v8f32, v4f32, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
117 defm : subvec_zero_lowering<"DQA", VR128, v4i64, v2i64, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
118 defm : subvec_zero_lowering<"DQA", VR128, v8i32, v4i32, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
119 defm : subvec_zero_lowering<"DQA", VR128, v16i16, v8i16, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
120 defm : subvec_zero_lowering<"DQA", VR128, v32i8, v16i8, v8i32, sub_xmm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
121 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
122
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
123 let Predicates = [HasVLX] in {
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
124 defm : subvec_zero_lowering<"APDZ128", VR128X, v4f64, v2f64, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
125 defm : subvec_zero_lowering<"APSZ128", VR128X, v8f32, v4f32, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
126 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v4i64, v2i64, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
127 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v8i32, v4i32, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
128 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v16i16, v8i16, v8i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
129 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v32i8, v16i8, v8i32, sub_xmm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
130
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
131 defm : subvec_zero_lowering<"APDZ128", VR128X, v8f64, v2f64, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
132 defm : subvec_zero_lowering<"APSZ128", VR128X, v16f32, v4f32, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
133 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v8i64, v2i64, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
134 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v16i32, v4i32, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
135 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v32i16, v8i16, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
136 defm : subvec_zero_lowering<"DQA64Z128", VR128X, v64i8, v16i8, v16i32, sub_xmm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
137
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
138 defm : subvec_zero_lowering<"APDZ256", VR256X, v8f64, v4f64, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
139 defm : subvec_zero_lowering<"APSZ256", VR256X, v16f32, v8f32, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
140 defm : subvec_zero_lowering<"DQA64Z256", VR256X, v8i64, v4i64, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
141 defm : subvec_zero_lowering<"DQA64Z256", VR256X, v16i32, v8i32, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
142 defm : subvec_zero_lowering<"DQA64Z256", VR256X, v32i16, v16i16, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
143 defm : subvec_zero_lowering<"DQA64Z256", VR256X, v64i8, v32i8, v16i32, sub_ymm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
144 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
145
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
146 let Predicates = [HasAVX512, NoVLX] in {
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
147 defm : subvec_zero_lowering<"APD", VR128, v8f64, v2f64, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
148 defm : subvec_zero_lowering<"APS", VR128, v16f32, v4f32, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
149 defm : subvec_zero_lowering<"DQA", VR128, v8i64, v2i64, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
150 defm : subvec_zero_lowering<"DQA", VR128, v16i32, v4i32, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
151 defm : subvec_zero_lowering<"DQA", VR128, v32i16, v8i16, v16i32, sub_xmm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
152 defm : subvec_zero_lowering<"DQA", VR128, v64i8, v16i8, v16i32, sub_xmm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
153
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
154 defm : subvec_zero_lowering<"APDY", VR256, v8f64, v4f64, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
155 defm : subvec_zero_lowering<"APSY", VR256, v16f32, v8f32, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
156 defm : subvec_zero_lowering<"DQAY", VR256, v8i64, v4i64, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
157 defm : subvec_zero_lowering<"DQAY", VR256, v16i32, v8i32, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
158 defm : subvec_zero_lowering<"DQAY", VR256, v32i16, v16i16, v16i32, sub_ymm>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
159 defm : subvec_zero_lowering<"DQAY", VR256, v64i8, v32i8, v16i32, sub_ymm>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
160 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
161
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
162 class maskzeroupper<ValueType vt, RegisterClass RC> :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
163 PatLeaf<(vt RC:$src), [{
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
164 return isMaskZeroExtended(N);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
165 }]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
166
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
167 def maskzeroupperv1i1 : maskzeroupper<v1i1, VK1>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
168 def maskzeroupperv2i1 : maskzeroupper<v2i1, VK2>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
169 def maskzeroupperv4i1 : maskzeroupper<v4i1, VK4>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
170 def maskzeroupperv8i1 : maskzeroupper<v8i1, VK8>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
171 def maskzeroupperv16i1 : maskzeroupper<v16i1, VK16>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
172 def maskzeroupperv32i1 : maskzeroupper<v32i1, VK32>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
173
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
174 // The patterns determine if we can depend on the upper bits of a mask register
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
175 // being zeroed by the previous operation so that we can skip explicit
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
176 // zeroing.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
177 let Predicates = [HasBWI] in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
178 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
179 maskzeroupperv1i1:$src, (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
180 (COPY_TO_REGCLASS VK1:$src, VK32)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
181 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
182 maskzeroupperv8i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
183 (COPY_TO_REGCLASS VK8:$src, VK32)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
184 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
185 maskzeroupperv16i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
186 (COPY_TO_REGCLASS VK16:$src, VK32)>;
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
187
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
188 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
189 maskzeroupperv1i1:$src, (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
190 (COPY_TO_REGCLASS VK1:$src, VK64)>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
191 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
192 maskzeroupperv8i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
193 (COPY_TO_REGCLASS VK8:$src, VK64)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
194 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
195 maskzeroupperv16i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
196 (COPY_TO_REGCLASS VK16:$src, VK64)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
197 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
198 maskzeroupperv32i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
199 (COPY_TO_REGCLASS VK32:$src, VK64)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
200 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
201
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
202 let Predicates = [HasAVX512] in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
203 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
204 maskzeroupperv1i1:$src, (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
205 (COPY_TO_REGCLASS VK1:$src, VK16)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
206 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
207 maskzeroupperv8i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
208 (COPY_TO_REGCLASS VK8:$src, VK16)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
209 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
210
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
211 let Predicates = [HasDQI] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
212 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
213 maskzeroupperv1i1:$src, (iPTR 0))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
214 (COPY_TO_REGCLASS VK1:$src, VK8)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
215 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
216
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
217 let Predicates = [HasVLX, HasDQI] in {
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
218 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
219 maskzeroupperv2i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
220 (COPY_TO_REGCLASS VK2:$src, VK8)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
221 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
222 maskzeroupperv4i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
223 (COPY_TO_REGCLASS VK4:$src, VK8)>;
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
224 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
225
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
226 let Predicates = [HasVLX] in {
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
227 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
228 maskzeroupperv2i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
229 (COPY_TO_REGCLASS VK2:$src, VK16)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
230 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
231 maskzeroupperv4i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
232 (COPY_TO_REGCLASS VK4:$src, VK16)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
233 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
234
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
235 let Predicates = [HasBWI, HasVLX] in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
236 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
237 maskzeroupperv2i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
238 (COPY_TO_REGCLASS VK2:$src, VK32)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
239 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
240 maskzeroupperv4i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
241 (COPY_TO_REGCLASS VK4:$src, VK32)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
242 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
243 maskzeroupperv2i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
244 (COPY_TO_REGCLASS VK2:$src, VK64)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
245 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
246 maskzeroupperv4i1:$src, (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
247 (COPY_TO_REGCLASS VK4:$src, VK64)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
248 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
249
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
250 // If the bits are not zero we have to fall back to explicitly zeroing by
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
251 // using shifts.
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
252 let Predicates = [HasAVX512] in {
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
253 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
254 (v1i1 VK1:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
255 (KSHIFTRWri (KSHIFTLWri (COPY_TO_REGCLASS VK1:$mask, VK16),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
256 (i8 15)), (i8 15))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
257
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
258 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
259 (v2i1 VK2:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
260 (KSHIFTRWri (KSHIFTLWri (COPY_TO_REGCLASS VK2:$mask, VK16),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
261 (i8 14)), (i8 14))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
262
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
263 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
264 (v4i1 VK4:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
265 (KSHIFTRWri (KSHIFTLWri (COPY_TO_REGCLASS VK4:$mask, VK16),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
266 (i8 12)), (i8 12))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
267 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
268
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
269 let Predicates = [HasAVX512, NoDQI] in {
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
270 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
271 (v8i1 VK8:$mask), (iPTR 0))),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
272 (KSHIFTRWri (KSHIFTLWri (COPY_TO_REGCLASS VK8:$mask, VK16),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
273 (i8 8)), (i8 8))>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
274 }
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
275
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
276 let Predicates = [HasDQI] in {
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
277 def : Pat<(v16i1 (insert_subvector (v16i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
278 (v8i1 VK8:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
279 (COPY_TO_REGCLASS (KMOVBkk VK8:$mask), VK16)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
280
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
281 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
282 (v1i1 VK1:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
283 (KSHIFTRBri (KSHIFTLBri (COPY_TO_REGCLASS VK1:$mask, VK8),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
284 (i8 7)), (i8 7))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
285 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
286 (v2i1 VK2:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
287 (KSHIFTRBri (KSHIFTLBri (COPY_TO_REGCLASS VK2:$mask, VK8),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
288 (i8 6)), (i8 6))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
289 def : Pat<(v8i1 (insert_subvector (v8i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
290 (v4i1 VK4:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
291 (KSHIFTRBri (KSHIFTLBri (COPY_TO_REGCLASS VK4:$mask, VK8),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
292 (i8 4)), (i8 4))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
293 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
294
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
295 let Predicates = [HasBWI] in {
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
296 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
297 (v16i1 VK16:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
298 (COPY_TO_REGCLASS (KMOVWkk VK16:$mask), VK32)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
299
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
300 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
301 (v16i1 VK16:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
302 (COPY_TO_REGCLASS (KMOVWkk VK16:$mask), VK64)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
303 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
304 (v32i1 VK32:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
305 (COPY_TO_REGCLASS (KMOVDkk VK32:$mask), VK64)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
306 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
307
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
308 let Predicates = [HasBWI, NoDQI] in {
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
309 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
310 (v8i1 VK8:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
311 (KSHIFTRDri (KSHIFTLDri (COPY_TO_REGCLASS VK8:$mask, VK32),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
312 (i8 24)), (i8 24))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
313
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
314 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
315 (v8i1 VK8:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
316 (KSHIFTRQri (KSHIFTLQri (COPY_TO_REGCLASS VK8:$mask, VK64),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
317 (i8 56)), (i8 56))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
318 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
319
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
320 let Predicates = [HasBWI, HasDQI] in {
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
321 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
322 (v8i1 VK8:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
323 (COPY_TO_REGCLASS (KMOVBkk VK8:$mask), VK32)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
324
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
325 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
326 (v8i1 VK8:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
327 (COPY_TO_REGCLASS (KMOVBkk VK8:$mask), VK64)>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
328 }
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
329
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
330 let Predicates = [HasBWI] in {
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
331 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
332 (v1i1 VK1:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
333 (KSHIFTRDri (KSHIFTLDri (COPY_TO_REGCLASS VK1:$mask, VK32),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
334 (i8 31)), (i8 31))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
335 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
336 (v2i1 VK2:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
337 (KSHIFTRDri (KSHIFTLDri (COPY_TO_REGCLASS VK2:$mask, VK32),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
338 (i8 30)), (i8 30))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
339 def : Pat<(v32i1 (insert_subvector (v32i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
340 (v4i1 VK4:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
341 (KSHIFTRDri (KSHIFTLDri (COPY_TO_REGCLASS VK4:$mask, VK32),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
342 (i8 28)), (i8 28))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
343
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
344 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
345 (v1i1 VK1:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
346 (KSHIFTRQri (KSHIFTLQri (COPY_TO_REGCLASS VK1:$mask, VK64),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
347 (i8 63)), (i8 63))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
348 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
349 (v2i1 VK2:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
350 (KSHIFTRQri (KSHIFTLQri (COPY_TO_REGCLASS VK2:$mask, VK64),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
351 (i8 62)), (i8 62))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
352 def : Pat<(v64i1 (insert_subvector (v64i1 immAllZerosV),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
353 (v4i1 VK4:$mask), (iPTR 0))),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
354 (KSHIFTRQri (KSHIFTLQri (COPY_TO_REGCLASS VK4:$mask, VK64),
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
355 (i8 60)), (i8 60))>;
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
356 }
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
357
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
358 //===----------------------------------------------------------------------===//
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
359 // Extra selection patterns for f128, f128mem
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
360
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
361 // movaps is shorter than movdqa. movaps is in SSE and movdqa is in SSE2.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
362 let Predicates = [NoAVX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
363 def : Pat<(alignedstore (f128 VR128:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
364 (MOVAPSmr addr:$dst, VR128:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
365 def : Pat<(store (f128 VR128:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
366 (MOVUPSmr addr:$dst, VR128:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
367
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
368 def : Pat<(alignedloadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
369 (MOVAPSrm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
370 def : Pat<(loadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
371 (MOVUPSrm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
372 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
373
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
374 let Predicates = [HasAVX, NoVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
375 def : Pat<(alignedstore (f128 VR128:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
376 (VMOVAPSmr addr:$dst, VR128:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
377 def : Pat<(store (f128 VR128:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
378 (VMOVUPSmr addr:$dst, VR128:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
379
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
380 def : Pat<(alignedloadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
381 (VMOVAPSrm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
382 def : Pat<(loadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
383 (VMOVUPSrm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
384 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
385
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
386 let Predicates = [HasVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
387 def : Pat<(alignedstore (f128 VR128X:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
388 (VMOVAPSZ128mr addr:$dst, VR128X:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
389 def : Pat<(store (f128 VR128X:$src), addr:$dst),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
390 (VMOVUPSZ128mr addr:$dst, VR128X:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
391
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
392 def : Pat<(alignedloadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
393 (VMOVAPSZ128rm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
394 def : Pat<(loadf128 addr:$src),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
395 (VMOVUPSZ128rm addr:$src)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
396 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
397
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
398 let Predicates = [UseSSE1] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
399 // andps is shorter than andpd or pand. andps is SSE and andpd/pand are in SSE2
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
400 def : Pat<(f128 (X86fand VR128:$src1, (memopf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
401 (ANDPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
402
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
403 def : Pat<(f128 (X86fand VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
404 (ANDPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
405
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
406 def : Pat<(f128 (X86for VR128:$src1, (memopf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
407 (ORPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
408
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
409 def : Pat<(f128 (X86for VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
410 (ORPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
411
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
412 def : Pat<(f128 (X86fxor VR128:$src1, (memopf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
413 (XORPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
414
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
415 def : Pat<(f128 (X86fxor VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
416 (XORPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
417 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
418
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
419 let Predicates = [HasAVX, NoVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
420 // andps is shorter than andpd or pand. andps is SSE and andpd/pand are in SSE2
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
421 def : Pat<(f128 (X86fand VR128:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
422 (VANDPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
423
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
424 def : Pat<(f128 (X86fand VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
425 (VANDPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
426
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
427 def : Pat<(f128 (X86for VR128:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
428 (VORPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
429
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
430 def : Pat<(f128 (X86for VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
431 (VORPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
432
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
433 def : Pat<(f128 (X86fxor VR128:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
434 (VXORPSrm VR128:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
435
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
436 def : Pat<(f128 (X86fxor VR128:$src1, VR128:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
437 (VXORPSrr VR128:$src1, VR128:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
438 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
439
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
440 let Predicates = [HasVLX] in {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
441 // andps is shorter than andpd or pand. andps is SSE and andpd/pand are in SSE2
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
442 def : Pat<(f128 (X86fand VR128X:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
443 (VANDPSZ128rm VR128X:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
444
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
445 def : Pat<(f128 (X86fand VR128X:$src1, VR128X:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
446 (VANDPSZ128rr VR128X:$src1, VR128X:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
447
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
448 def : Pat<(f128 (X86for VR128X:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
449 (VORPSZ128rm VR128X:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
450
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
451 def : Pat<(f128 (X86for VR128X:$src1, VR128X:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
452 (VORPSZ128rr VR128X:$src1, VR128X:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
453
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
454 def : Pat<(f128 (X86fxor VR128X:$src1, (loadf128 addr:$src2))),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
455 (VXORPSZ128rm VR128X:$src1, f128mem:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
456
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
457 def : Pat<(f128 (X86fxor VR128X:$src1, VR128X:$src2)),
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
458 (VXORPSZ128rr VR128X:$src1, VR128X:$src2)>;
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 134
diff changeset
459 }