[PATCH] D33866: [DAGCombiner] loosen restriction for creating narrow vector load from extract(wide load)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 09:10:10 PDT 2017


spatel created this revision.
Herald added subscribers: kristof.beyls, tpr, javed.absar, nhaehnle, wdng, mcrosier, aemerson.

This is a follow-up to the change in https://reviews.llvm.org/D33578 that introduced this transform:
(extract_subvector (load wide vector)) --> (load narrow vector)

As noted in the new TODO, I'd like to loosen this up more, but this half-step causes enough regression tests changes that I think it's worth looking at these first.

This may just be pointing out cases where isExtractSubvectorCheap() is not properly overridden. Only ARM and x86 specify that those are cheap, so that's why we see no ARM changes and only limited x86 changes here.

I can't tell if the AMDGPU diffs are good or not, except the SAD test which seems likely to be a regression, so I added a FIXME comment there.


https://reviews.llvm.org/D33866

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/arm64-vabs.ll
  test/CodeGen/AArch64/merge-store.ll
  test/CodeGen/AMDGPU/half.ll
  test/CodeGen/AMDGPU/load-constant-i32.ll
  test/CodeGen/AMDGPU/load-global-f32.ll
  test/CodeGen/AMDGPU/load-global-i32.ll
  test/CodeGen/AMDGPU/sad.ll
  test/CodeGen/AMDGPU/vectorize-global-local.ll
  test/CodeGen/X86/vec_int_to_fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33866.101320.patch
Type: text/x-patch
Size: 22227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170603/07826b1e/attachment.bin>


More information about the llvm-commits mailing list