diff options
author | Fabian Ritter <fabian.ritter@amd.com> | 2025-04-14 09:13:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-14 09:13:54 +0200 |
commit | cf188d650ce26b4ee3e11101d844361fca15ba64 (patch) | |
tree | 2cd709b0ff88a7eac2e1d49bbc6adcace8f29dcd /clang/lib/CodeGen | |
parent | 150e7b14f9474bc4d6891faaae4de6b8c5f6c797 (diff) | |
download | llvm-cf188d650ce26b4ee3e11101d844361fca15ba64.zip llvm-cf188d650ce26b4ee3e11101d844361fca15ba64.tar.gz llvm-cf188d650ce26b4ee3e11101d844361fca15ba64.tar.bz2 |
[AMDGPU] Avoid crashes for non-byte-sized types in PromoteAlloca (#134042)
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
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions