diff options
author | Sebastian Neubauer <sebastian.neubauer@amd.com> | 2020-01-31 14:18:18 +0100 |
---|---|---|
committer | Sebastian Neubauer <sebastian.neubauer@amd.com> | 2020-02-10 15:04:07 +0100 |
commit | 7cddd15e5616a1872106a6664e1d622a3adad7cc (patch) | |
tree | fc169051f4af7475c1bf2ec2ab0c6f77cceadc61 /llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp | |
parent | 5a1778057f72b8e0444a7932144a3fa441b641bc (diff) | |
download | llvm-7cddd15e5616a1872106a6664e1d622a3adad7cc.zip llvm-7cddd15e5616a1872106a6664e1d622a3adad7cc.tar.gz llvm-7cddd15e5616a1872106a6664e1d622a3adad7cc.tar.bz2 |
[SelectionDAG] Optimize build_vector of truncates and shifts
Add a simplification to fuse a manual vector extract with shifts and
truncate into a bitcast.
Unpacking and packing values into vectors is only optimized with
extractelement instructions, not when manually unpacked using shifts
and truncates.
This patch simplifies shifts and truncates into a bitcast if possible.
Simplify (build_vec (trunc $1)
(trunc (srl $1 width))
(trunc (srl $1 (2 * width))) ...)
to (bitcast $1)
Differential Revision: https://reviews.llvm.org/D73892
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp')
0 files changed, 0 insertions, 0 deletions