[llvm] [SPIR-V] Fix type mismatch in scalar-to-vector promotion for mixed-type builtins (PR #190969)
Marcos Maronas via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 11:06:58 PDT 2026
https://github.com/maarquitos14 commented:
Just to test my understanding of the underlying issue and the fix, a few questions.
> When promoting scalar arguments to vectors for builtins like ldexp, pown, and rootn, use the correct vector type matching the argument element type instead of always using the return type: these builtins take an integer argument but at the same time have floating point return type
Let's use `floatn pown(floatn x, intn y)` as example. The integer argument is `y`, and we need to also promote it to vector, but prior to this patch, because the return type is `floatn`, the `intn` type didn't exist, and we wouldn't be able to properly promote `intn` to vector. Is my understanding correct?
https://github.com/llvm/llvm-project/pull/190969
More information about the llvm-commits
mailing list