[PATCH] D79096: [SelectionDAG] Unify scalarizeVectorLoad and VectorLegalizer::ExpandLoad

LemonBoy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 09:06:15 PDT 2020


LemonBoy created this revision.
LemonBoy added reviewers: craig.topper, tstellar, bogner.
Herald added subscribers: llvm-commits, kerbowa, dmgreen, hiraditya, kristof.beyls, tpr, nhaehnle, jvesely.
Herald added a project: LLVM.

The two code paths have the same goal, legalizing a load of a non-byte-sized vector by loading the "flattened" representation in memory, slicing off each single element and then building a vector out of those pieces.

The technique employed by `ExpandLoad`  is slightly more convoluted and produces slightly better codegen on ARM, AMDGPU and x86 but suffers from some bugs (D78480 <https://reviews.llvm.org/D78480>) and is wrong for BE machines.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79096

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AMDGPU/idot8s.ll
  llvm/test/CodeGen/Thumb2/mve-pred-bitcast.ll
  llvm/test/CodeGen/Thumb2/mve-pred-loadstore.ll
  llvm/test/CodeGen/X86/avx512-extract-subvector-load-store.ll
  llvm/test/CodeGen/X86/bitcast-vector-bool.ll
  llvm/test/CodeGen/X86/clear_upper_vector_element_bits.ll
  llvm/test/CodeGen/X86/load-local-v3i1.ll
  llvm/test/CodeGen/X86/load-local-v4i5.ll
  llvm/test/CodeGen/X86/pr15267.ll
  llvm/test/CodeGen/X86/vector-sext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79096.260929.patch
Type: text/x-patch
Size: 107409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200429/3639d9e8/attachment-0001.bin>


More information about the llvm-commits mailing list