[all-commits] [llvm/llvm-project] 9652ff: [AMDGPU] Avoid crashes for non-byte-sized types in...
Fabian Ritter via All-commits
all-commits at lists.llvm.org
Wed Apr 2 00:37:38 PDT 2025
Branch: refs/heads/users/ritter-x2a/04-02-_amdgpu_avoid_crashes_for_non-byte-sized_types_in_promotealloca
Home: https://github.com/llvm/llvm-project
Commit: 9652ff18c2f294b93f2b66e646301092b7d7fd13
https://github.com/llvm/llvm-project/commit/9652ff18c2f294b93f2b66e646301092b7d7fd13
Author: Fabian Ritter <fabian.ritter at amd.com>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
A llvm/test/CodeGen/AMDGPU/promote-alloca-non-byte-sizes.ll
Log Message:
-----------
[AMDGPU] Avoid crashes for non-byte-sized types in PromoteAlloca
This patch addresses three problems when promoting allocas to vectors:
- Element types with size < 1 byte in allocas with a vector type caused
divisions by zero.
- Element types whose size doesn't match their AllocSize hit an assertion.
- Access types whose size doesn't match their AllocSize hit an assertion.
With this patch, we do not attempt to promote affected allocas to vectors. In
principle, we could handle these cases in PromoteAlloca, e.g., by truncating
and extending elements from/to their allocation size. It's however unclear if
we ever encounter such cases in practice, so that doesn't seem worth the added
complexity.
For SWDEV-511252
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