diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2023-02-02 12:01:04 -0600 |
---|---|---|
committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2023-02-02 12:01:14 -0600 |
commit | a5b662a834fde4188a26fd83ed26745fc4c1bc06 (patch) | |
tree | 6fa0f847c5d147f09f3abc9670cbc60cc4e46b69 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | 7783bba22c7add678d796741d30669c73159b3d8 (diff) | |
download | llvm-a5b662a834fde4188a26fd83ed26745fc4c1bc06.zip llvm-a5b662a834fde4188a26fd83ed26745fc4c1bc06.tar.gz llvm-a5b662a834fde4188a26fd83ed26745fc4c1bc06.tar.bz2 |
[SelectionDAG] Correctly widen bitcast of scalar to vector for big endian
For big endian targets that need a node such as this:
v2i8 = bitcast i16:tN
legalized by:
1. Promoting the i16 input type
2. Widening the v2i32 result type
The result will be incorrect because the legalizer will promote
the input type and then produce a scalar_to_vector from that
wider type to a vector of N elements of that type. That puts
the desired bits into the low order bytes of element zero and
they need to be in the high order bytes on big endian systems.
This patch changes the legalization to widen to a vector with
elements of the original scalar size.
Differential revision: https://reviews.llvm.org/D140365
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions