D120018 altered this combine to work on buildvectors as opposed to shuffle dup's. This works well for dups and other things that are expanded into buildvectors. Some shuffles are legal though, and stay as vector_shuffle through lowering. This expands the transform to also handle shuffles, so that we can turn mul(shuffle(sext into mul(sext(shuffle and more readily make smull/umull instructions. This can come up from the SLP vectorizer adding shuffles that are costed from extends.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Code looks good to me, but a small nitpick on the function name
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
13640–13643 | As this no longer solely operates on BuildVector instructions, should the "Build" part of the function name be removed? |
Comment Actions
Rename function to performBuildShuffleExtendCombine.
I've also limited shuffle's to be safe - just allowing SIGN_EXTEND or ZERO_EXTEND as the input. The input is a vector and calculatePreExtendType may not work as expected in those situations.
As this no longer solely operates on BuildVector instructions, should the "Build" part of the function name be removed?