[all-commits] [llvm/llvm-project] c23cbe: [VectorUtils] add IR-level analysis for widening o...
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Apr 12 07:20:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c23cbefd9d73e8551b0c8b6cc3f14bb6b067ca92
https://github.com/llvm/llvm-project/commit/c23cbefd9d73e8551b0c8b6cc3f14bb6b067ca92
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-04-12 (Sun, 12 Apr 2020)
Changed paths:
M llvm/include/llvm/Analysis/VectorUtils.h
M llvm/lib/Analysis/VectorUtils.cpp
M llvm/unittests/Analysis/VectorUtilsTest.cpp
Log Message:
-----------
[VectorUtils] add IR-level analysis for widening of shuffle mask
This is similar to the recent move/addition of "scaleShuffleMask" (D76508),
but there are a couple of differences:
1. The existing x86 helper (canWidenShuffleElements) always tries to
divide-by-2, so it gets called iteratively and wouldn't handle the
general case of non-pow-2 length.
2. The existing x86 code handles "SM_SentinelZero" - we don't have
that in IR, but this code should be safe to use with that or other
special (negative) values.
The motivation is to enable shuffle folds in instcombine/vector-combine
that are similar to D76844 and D76727, but in the reverse-bitcast direction.
Those patterns are visible in the tests for D40633.
Differential Revision: https://reviews.llvm.org/D77881
More information about the All-commits
mailing list