Hi all,
The DAG combiner for trunc operations performs a specific folding of buildvector, bitcast and truncate operations into a single buildvector operation. The current implementation is intended for little endian mode only and does not take the big endian order of data into account.
This patch implements the element selection for buildvector for the least significant data (trunc) based upon the "higher side" of vector element.
Although this patch is issued for the ARM BE target, it affects all big endian targets.
Please review, thanks,
Christian