[llvm] [SelectionDAG] Use promoted types when creating nodes after type legalization (PR #178617)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 30 03:51:14 PST 2026


RKSimon wrote:

> > So this is just about implicit truncation in build vectors?
> 
> The new built `build_vector` had same type as the original vector processed, and no truncation happened. But the element type of the new `build_vector` maybe illegal for target and will cause assertion later. Using promoted type to build the vector can avoid this.

Yes, that's what I meant by implicit truncation - we permit integer build_vector elements to be a width wider than the vector'#s scalar type.

https://github.com/llvm/llvm-project/pull/178617


More information about the llvm-commits mailing list