aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/algorithm.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-02-17 11:41:41 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-02-17 11:42:43 +0000
commit05c64ea6722bc973ebf61653342518d065316feb (patch)
tree6e450781d3b06d6c383787afc94c3cd3d610a148 /libcxx/src/algorithm.cpp
parentc8be7e96bb718f7965fb69f8ed26aaa5175fd26b (diff)
downloadllvm-05c64ea6722bc973ebf61653342518d065316feb.zip
llvm-05c64ea6722bc973ebf61653342518d065316feb.tar.gz
llvm-05c64ea6722bc973ebf61653342518d065316feb.tar.bz2
[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) (REAPPLIED)
Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) -> bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d)) Attempt to fold from a shuffle of a pair of binops to a binop of shuffles, as long as one/both of the binop sources are also shuffles that can be merged with the outer shuffle. This should guarantee that we remove one binop without introducing any additional shuffles. Technically there's potential for a merged shuffle's lowering to be poorer than the original shuffle, but it could also be better, and I'm not seeing any regressions as long as we keep the 'don't merge splats' rule already present in MergeInnerShuffle. This expands and generalizes an existing X86 combine and attempts to merge either of each binop's sources (with an on-the-fly commutation of the shuffle mask) - we couldn't do that in the x86 version as it had to stay in a form that DAGCombine's MergeInnerShuffle would still recognise. Fixes issue raised by @saugustine in rG5aa8f4c0843a where we were failing to replace null shuffle operands from MergeInnerShuffle to UNDEFs. Differential Revision: https://reviews.llvm.org/D96345
Diffstat (limited to 'libcxx/src/algorithm.cpp')
0 files changed, 0 insertions, 0 deletions