[all-commits] [llvm/llvm-project] f497fe: [mlir][spirv] Fix some issues related to convertin...
Andrea Faulds via All-commits
all-commits at lists.llvm.org
Thu Feb 6 10:07:55 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f497fe464bad8743b8a87ba04a5c53579a03711a
https://github.com/llvm/llvm-project/commit/f497fe464bad8743b8a87ba04a5c53579a03711a
Author: Andrea Faulds <andrea.faulds at amd.com>
Date: 2025-02-06 (Thu, 06 Feb 2025)
Changed paths:
M mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp
M mlir/lib/Conversion/VectorToSPIRV/CMakeLists.txt
M mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
M mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRVPass.cpp
M mlir/test/Conversion/UBToSPIRV/ub-to-spirv.mlir
M mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
Log Message:
-----------
[mlir][spirv] Fix some issues related to converting ub.poison to SPIR-V (#125905)
This is a follow-up to 5df62bdc9be9c258c5ac45c8093b71e23777fa0e. That
commit should not have needed to make the vector.insert and
vector.extract conversions to SPIR-V directly handle the static poison
index case, as there is a fold from those to ub.poison, and a conversion
pattern from ub.poison to spirv.Undef, however:
- The ub.poison fold result could not be materialized by the vector
dialect (fixed as of d13940ee263ff50b7a71e21424913cc0266bf9d4).
- The conversion pattern wasn't being populated in VectorToSPIRVPass,
which is used by the tests. This commit changes this.
- The ub.poison to spirv.Undef pattern rejected non-scalar types, which
prevented its use for vector results. It is unclear why this restriction
existed; a remark in D156163 said this was to avoid converting "user
types", but it is not obvious why these shouldn't be permitted (the
SPIR-V specification allows OpUndef for all types except OpTypeVoid).
This commit removes this restriction.
With these fixed, this commit removes the redundant static poison index
handling, and updates the tests.
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