[PATCH] D31426: [DAGCombine] Combine shuffle of splat with multiple uses
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 16:14:44 PDT 2017
spatel added a comment.
This seems unnecessarily complicated. Why can't we just match any shuffle of a splat before we get here and simplify it?
Also, would you be interested in fixing this in IR? :)
$ ./opt -instsimplify shufsplat.ll -S
define <4 x i32> @foo(<4 x i32> %x) {
%splat = shufflevector <4 x i32> %x, <4 x i32> undef, <4 x i32> zeroinitializer
%shuf = shufflevector <4 x i32> %splat, <4 x i32> undef, <4 x i32> <i32 0, i32 3, i32 2, i32 1>
ret <4 x i32> %shuf
}
This example is handled by instcombine...but in a very inefficient way.
Repository:
rL LLVM
https://reviews.llvm.org/D31426
More information about the llvm-commits
mailing list