summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-08-02 13:25:26 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-08-02 13:25:26 +0000
commitfba97e6e21b6df19991264e8bd887cdb51f8334d (patch)
treebeb49e38cec1be1064eef6860512a7f3112278a9 /clang/lib/Basic/FileSystemStatCache.cpp
parentf081ec7609debfeaeb0220ca49c82f03c544186d (diff)
downloadbcm5719-llvm-fba97e6e21b6df19991264e8bd887cdb51f8334d.tar.gz
bcm5719-llvm-fba97e6e21b6df19991264e8bd887cdb51f8334d.zip
[SLP] Fix for PR31880: shuffle and vectorize repeated scalar ops on extracted elements
Summary: Currently most of the time vectors of extractelement instructions are treated as scalars that must be gathered into vectors. But in some cases, like when we have extractelement instructions from single vector with different constant indeces or from 2 vectors of the same size, we can treat this operations as shuffle of a single vector or blending of 2 vectors. ``` define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) { %x0 = extractelement <2 x i8> %x, i32 0 %y1 = extractelement <2 x i8> %y, i32 1 %x0x0 = mul i8 %x0, %x0 %y1y1 = mul i8 %y1, %y1 %ins1 = insertelement <2 x i8> undef, i8 %x0x0, i32 0 %ins2 = insertelement <2 x i8> %ins1, i8 %y1y1, i32 1 ret <2 x i8> %ins2 } ``` can be converted to something like ``` define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) { %1 = shufflevector <2 x i8> %x, <2 x i8> %y, <2 x i32> <i32 0, i32 3> %2 = mul <2 x i8> %1, %1 ret <2 x i8> %2 } ``` Currently this type of conversion is considered as high cost transformation. Reviewers: mzolotukhin, delena, mkuper, hfinkel, RKSimon Subscribers: ashahid, RKSimon, spatel, llvm-commits Differential Revision: https://reviews.llvm.org/D30200 llvm-svn: 309812
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud