[all-commits] [llvm/llvm-project] f2b29c: [SPIRV] Enforce integer return types for GetDimens...
Steven Perron via All-commits
all-commits at lists.llvm.org
Wed Apr 1 07:11:50 PDT 2026
Branch: refs/heads/users/s-perron/texture2d-get-dimension
Home: https://github.com/llvm/llvm-project
Commit: f2b29c3371324eaaa86317413bf33ba746fe9cea
https://github.com/llvm/llvm-project/commit/f2b29c3371324eaaa86317413bf33ba746fe9cea
Author: Steven Perron <stevenperron at google.com>
Date: 2026-04-01 (Wed, 01 Apr 2026)
Changed paths:
M llvm/include/llvm/IR/IntrinsicsSPIRV.td
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
M llvm/test/CodeGen/SPIRV/hlsl-resources/GetDimensions.ll
R llvm/test/CodeGen/SPIRV/hlsl-resources/GetDimensionsFloat.ll
Log Message:
-----------
[SPIRV] Enforce integer return types for GetDimensions intrinsics
Update the `GetDimensions` intrinsics in the SPIR-V backend to strictly
return integer types (i32 or vectors of i32), aligning with the HLSL
design document for GetDimensions lowering. The intrinsics are no longer
overloaded on the return type.
As a result, instruction selection in `SPIRVInstructionSelector.cpp`
has been simplified by removing the logic that handles floating-point
returns and generates `OpConvertUToF` instructions. Floating-point
conversions are now expected to be handled by Clang codegen.
Updates:
- IntrinsicsSPIRV.td: Replaced `llvm_any_ty` with explicit integer
and integer vector types (`llvm_i32_ty`, `llvm_v2i32_ty`, etc.).
- SPIRVInstructionSelector.cpp: Removed floating-point type checks and
`OpConvertUToF` handling for GetDimensions.
- GetDimensions.ll: Updated to use the correct integer-only intrinsic
names without return type suffixes.
- GetDimensionsFloat.ll: Deleted, as the intrinsics no longer accept
floating-point return types directly.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list