diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-07-10 18:04:55 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-07-10 18:04:55 +0000 |
commit | b2921c7ca00afe7d1dd9194a60fb6460e94aa4a9 (patch) | |
tree | c6826a402a6330cdd82c0ab0d26ace14fa47b245 /lldb/scripts/Python | |
parent | 7cc27649a68170c6da3cecbde94e8a14dd56346e (diff) | |
download | llvm-b2921c7ca00afe7d1dd9194a60fb6460e94aa4a9.zip llvm-b2921c7ca00afe7d1dd9194a60fb6460e94aa4a9.tar.gz llvm-b2921c7ca00afe7d1dd9194a60fb6460e94aa4a9.tar.bz2 |
[DAG] Further improve the logic in DAGCombiner that folds a pair of shuffles into a single shuffle if the resulting mask is legal.
This patch teaches the DAGCombiner how to fold shuffles according to the
following new rules:
1. shuffle(shuffle(x, y), undef) -> x
2. shuffle(shuffle(x, y), undef) -> y
3. shuffle(shuffle(x, y), undef) -> shuffle(x, undef)
4. shuffle(shuffle(x, y), undef) -> shuffle(y, undef)
The backend avoids to combine shuffles according to rules 3. and 4. if
the resulting shuffle does not have a legal mask. This is to avoid introducing
illegal shuffles that are potentially expanded into a sub-optimal sequence of
target specific dag nodes during vector legalization.
Added test case combine-vec-shuffle-2.ll to verify that we correctly triggers
the new rules when combining shuffles.
llvm-svn: 212748
Diffstat (limited to 'lldb/scripts/Python')
0 files changed, 0 insertions, 0 deletions