[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
Loading
Please sign in to comment