[PATCH] D73549: [Analysis] add optional index parameter to isSplatValue()

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 06:41:16 PST 2020


spatel created this revision.
spatel added reviewers: nikic, lebedev.ri, efriedma, RKSimon.
Herald added subscribers: arphaman, hiraditya, mcrosier.
Herald added a project: LLVM.

We want to allow splat value transforms to improve PR44588 and related bugs:
https://bugs.llvm.org/show_bug.cgi?id=44588
...but to do that, we need to know if values are splatted from the same, specific index (lane) rather than splatted from an arbitrary index.

We can improve the undef handling with 1-liner follow-ups because the Constant API optionally allow undefs now.

This change will cause a conflict with the planned update of shufflevector's mask in D72467 <https://reviews.llvm.org/D72467>, but that's a small fix-up depending on if it lands first or second.


https://reviews.llvm.org/D73549

Files:
  llvm/include/llvm/Analysis/VectorUtils.h
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/unittests/Analysis/VectorUtilsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73549.240863.patch
Type: text/x-patch
Size: 8914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200128/3a84d0f0/attachment.bin>


More information about the llvm-commits mailing list