[HIP] fix long double size
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Tue, 14 Jun 2022 16:40:37 +0000 (12:40 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 15 Jun 2022 01:57:56 +0000 (21:57 -0400)
commitaf9ee3357cec931af68a3a0bb83e82de977caa37
treee40d3fdce5861da3f234dbcdd90f082c9f15772f
parent587573b9f9f74fdb3f816ca6de72b3ecdc6441d3
[HIP] fix long double size

For amdgpu target long double type is the same as double type.
The width and align of long double type was incorrectly
overridden when copying aux target properties, which
caused assertion in codegen when emitting global
variables with long double type.

This patch fix that by saving and restoring width
and align of long double type.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D127771

Fixes: SWDEV-335515
clang/lib/Basic/Targets/AMDGPU.cpp
clang/test/CodeGenCUDA/long-double.cu [new file with mode: 0644]