[PATCH] D118144: [GVN] Support chain of phi nodes in exit blocks.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 14:11:08 PST 2022


fhahn updated this revision to Diff 404161.
fhahn added a comment.

A major rewrite/update following @reames' suggestion in D118143 <https://reviews.llvm.org/D118143> as extension to the available value analysis. This patch now tries to find an existing value-select that can be used instead of loading from a pointer-select. The first version is intentionally kept quite restrictive and can be extended through follow-ups.

Together with D118143 <https://reviews.llvm.org/D118143>, this enables vectorization for common code like `std::min_element`, yielding substantial speedups for code that uses it for non-tiny numbers of elements.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118144/new/

https://reviews.llvm.org/D118144

Files:
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Transforms/GVN/PRE/pre-loop-load-through-select.ll
  llvm/test/Transforms/GVN/load-of-pointer-select-available.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118144.404161.patch
Type: text/x-patch
Size: 12007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/fd0d509f/attachment.bin>


More information about the llvm-commits mailing list