[all-commits] [llvm/llvm-project] 0c96c6: [clang][CodeGen] Fix crash on non-natural type in ...
Pierre van Houtryve via All-commits
all-commits at lists.llvm.org
Thu May 22 07:46:08 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c96c65169d65a4f7220be5b07c42237c6880911
https://github.com/llvm/llvm-project/commit/0c96c65169d65a4f7220be5b07c42237c6880911
Author: Pierre van Houtryve <pierre.vanhoutryve at amd.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
A clang/test/CodeGenOpenCL/check-atomic-alignment.cl
Log Message:
-----------
[clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (#141053)
In some specific scenarios, `Ptr.getElementType()` won't be a primitive
type or a vector of primitive types, and thus `getScalarSizeInBits()`
returns zero.
Use the datalayout to get the proper size of the type instead of making
an implicit assumption that the type is a simple primitive type.
Solves SWDEV-534184
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