[PATCH] D42090: [DAGCombiner] Add a DAG combine to turn a splat build_vector where the splat elemnt is a bitcast from a vector type into a concat_vector
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 11:35:22 PST 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14953
+ if (SDValue Splat = cast<BuildVectorSDNode>(N)->getSplatValue()) {
+ if (Splat.getOpcode() == ISD::BITCAST) {
+ EVT SrcVT = Splat.getOperand(0).getValueType();
----------------
spatel wrote:
> Might want to use 'peekThroughBitcast' here...although that reminds me that I still need to figure out if we can remove the loop in there yet.
I thought about that, but I would have to still verify that at least one bitcast had existed. My assumption is that if there were multiple bitcasts, they would be combined and cause this user to get re-evaluated right?
https://reviews.llvm.org/D42090
More information about the llvm-commits
mailing list