[PATCH] D88060: [GISel]: Few InsertVecElt combines

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 17:43:50 PDT 2020


aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: arsenm, aemerson, paquette, dsanders, qcolombet, volkan.
Herald added subscribers: kerbowa, mgrang, hiraditya, nhaehnle, jvesely.
Herald added a project: LLVM.
aditya_nandakumar requested review of this revision.
Herald added a subscriber: wdng.

This adds the following combines that frequently occur

1. build_vector formation from insert_vectors.
2. insert_vec_elt(build_vector) -> build_vector

WRT (1), a few more cases need to be handled (such as handling multiple insert_vec_elts to the same index) and I'll try to add them shortly after this.

Also adds pattern matching for insert_vec_elts.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88060

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/combine-insert-vec-elt.mir
  llvm/test/CodeGen/AArch64/combine-loads.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/xnor.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88060.293302.patch
Type: text/x-patch
Size: 16416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200922/a431243e/attachment.bin>


More information about the llvm-commits mailing list