[llvm] r218928 - [AVX512] Pull pattern for subvector insert into the instruction definition
Adam Nemet
anemet at apple.com
Thu Oct 2 16:18:30 PDT 2014
Author: anemet
Date: Thu Oct 2 18:18:30 2014
New Revision: 218928
URL: http://llvm.org/viewvc/llvm-project?rev=218928&view=rev
Log:
[AVX512] Pull pattern for subvector insert into the instruction definition
No functional change intended.
Very similar to the change I made for subvector extract in r218480.
test/CodeGen/X86/avx512-insert-extract.ll covers this.
Modified:
llvm/trunk/lib/Target/X86/X86InstrAVX512.td
Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=218928&r1=218927&r2=218928&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Thu Oct 2 18:18:30 2014
@@ -309,7 +309,10 @@ multiclass vinsert_for_size<int Opcode,
(ins VR512:$src1, From.RC:$src2, i8imm:$src3),
"vinsert" # From.EltTypeName # "x4\t{$src3, $src2, $src1, $dst|"
"$dst, $src1, $src2, $src3}",
- []>, EVEX_4V, EVEX_V512;
+ [(set To.RC:$dst, (vinsert_insert:$src3 (To.VT VR512:$src1),
+ (From.VT From.RC:$src2),
+ (iPTR imm)))]>,
+ EVEX_4V, EVEX_V512;
let mayLoad = 1 in
def rm : AVX512AIi8<Opcode, MRMSrcMem, (outs VR512:$dst),
@@ -319,13 +322,6 @@ multiclass vinsert_for_size<int Opcode,
[]>, EVEX_4V, EVEX_V512, EVEX_CD8<From.EltSize, CD8VT4>;
}
- // Codegen pattern, e.g. v4i32 -> v16i32 for vinserti32x4
- def : Pat<(vinsert_insert:$ins
- (To.VT VR512:$src1), (From.VT From.RC:$src2), (iPTR imm)),
- (To.VT (!cast<Instruction>(NAME # From.EltSize # "x4rr")
- VR512:$src1, From.RC:$src2,
- (INSERT_get_vinsert_imm VR512:$ins)))>;
-
// Codegen pattern with the alternative types, e.g. v2i64 -> v8i64 for
// vinserti32x4
def : Pat<(vinsert_insert:$ins
More information about the llvm-commits
mailing list