[llvm] [SPIR-V] Add vector type support for non-standard integers in G_TRUNC op (PR #198213)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 7 22:16:56 PDT 2026


aobolensk wrote:

> Thanks! Q: This fixes G_TRUNC specifically, but widenScalarType still early-returns on vectors, so other vector ops on non-standard int element types remain un-widened. Is G_TRUNC the only op that currently reaches here with such types, or is this the first of several follow-ups? Worth a note in the description.

So far, `G_TRUNC` is special because it is the only one that depend on the original destination. `G_ZEXT/G_SEXT/G_ANYEXT` are much simpler as of now, not really sure if anything like that should be added there as well, but in that case it should be changes for the scalar case first 

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


More information about the llvm-commits mailing list