https://github.com/JOE1994 edited
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JOE1994 closed
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib
-fopenmp-is-target-device -emit-llvm %s -o - | FileCheck %s
+
+// Don't crash with assertions build.
+
+// CHECK: @MyGlobVar = external
https://github.com/arsenm approved this pull request.
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib
-fopenmp-is-target-device -emit-llvm %s -o - | FileCheck %s
+
+// Don't crash with assertions build.
+
+// CHECK: @MyGlobVar = external
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64
-disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s
-o %t-x86-host.bc
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-unknown-linux-gnu -target-
https://github.com/JOE1994 updated
https://github.com/llvm/llvm-project/pull/119246
>From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim
Date: Mon, 9 Dec 2024 10:33:18 -0600
Subject: [PATCH 1/4] [clang] Recover necessary AddrSpaceCast
A necessary AddrSpace
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64
-disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s
-o %t-x86-host.bc
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-unknown-linux-gnu -target-
https://github.com/JOE1994 updated
https://github.com/llvm/llvm-project/pull/119246
>From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim
Date: Mon, 9 Dec 2024 10:33:18 -0600
Subject: [PATCH 1/3] [clang] Recover necessary AddrSpaceCast
A necessary AddrSpace
efriedma-quic wrote:
The function in question is part of the Itanium C++ ABI; the ABI itself doesn't
say anything about address-spaces, so by default we assume everything related
to the C++ ABI is in the flat address-space. If we start messing with that,
we'll need to write a specification so
arsenm wrote:
> I mean, why do we have to watch for type mismatches and fix them instead of
> creating the correct type in the first place? There is
> `getPointerType(RetQT)` just above, shouldn't it be something like
> `getPointerType(RetQT, )`? Or RetQT should have had
> the correct address
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
arsenm wrote:
The test should not crash under any build. It does not matter what the symptoms
are today
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing l
s-barannikov wrote:
> I'm unfamiliar with Clang Qualtypes
I see. Well, neither am I :) I brought this up in case someone else could
suggest the preferred way to fix the issue.
I don't have objections against the current approach, but I'm not qualified to
review it either.
https://github.com/
JOE1994 wrote:
> I mean, why do we have to watch for type mismatches and fix them instead of
> creating the correct type in the first place?
There is getPointerType(RetQT) just above, shouldn't it be something like
getPointerType(RetQT, )?
Or RetQT should have had the correct address space, but
s-barannikov wrote:
> Updating the wrapper function's return type as below also fixes the error:
I mean, why do we have to watch for type mismatches and fix them instead of
creating the correct type in the first place?
There is `getPointerType(RetQT)` just above, shouldn't it be something like
https://github.com/JOE1994 updated
https://github.com/llvm/llvm-project/pull/119246
>From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001
From: Youngsuk Kim
Date: Mon, 9 Dec 2024 10:33:18 -0600
Subject: [PATCH 1/2] [clang] Recover necessary AddrSpaceCast
A necessary AddrSpace
JOE1994 wrote:
> May it be possible that the wrapper function's return type is invalid and the
> cast isn't needed?
LLVM-IR (from llvm without assertions, before this revision)
shows that the wrapper function returns `ptr` while `MyGlobVar` has
`addrspace(1)`.
```llvm
$thread-local wrapper ro
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64
-disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s
-o %t-x86-host.bc
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-un
https://github.com/JOE1994 edited
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
JOE1994 wrote:
The test crashes with an error only with an `asserts` build.
Should I just that aspect in a comment, and remove the `asserts` requirement?
https://github.com/llvm/llvm-project/pull/119246
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64
-disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s
-o %t-x86-host.bc
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple
x86_64-un
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
arsenm wrote:
This does not require asserts
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
CharUnits Align = CGM.getContext().getDeclAlign(VD);
Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
}
+if (Val->getType() != Wrapper->getReturnType()) {
+ Val = Build
https://github.com/s-barannikov commented:
May it be possible that the wrapper function's return type is invalid and the
cast isn't needed?
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/119246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
CharUnits Align = CGM.getContext().getDeclAlign(VD);
Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
}
+if (Val->getType() != Wrapper->getReturnType()) {
+ Val = Build
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Youngsuk Kim (JOE1994)
Changes
A necessary AddrSpaceCast was wrongfully deleted in
5c91b2886f6bf400b60ca7839069839ac3980f8f . Recover the AddrSpaceCast.
This fixes #86791 .
---
Full diff: https://github.com/llvm/llvm-project/pull
llvmbot wrote:
@llvm/pr-subscribers-backend-amdgpu
Author: Youngsuk Kim (JOE1994)
Changes
A necessary AddrSpaceCast was wrongfully deleted in
5c91b2886f6bf400b60ca7839069839ac3980f8f . Recover the AddrSpaceCast.
This fixes #86791 .
---
Full diff: https://github.com/llvm/llvm-project/pul
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Youngsuk Kim (JOE1994)
Changes
A necessary AddrSpaceCast was wrongfully deleted in
5c91b2886f6bf400b60ca7839069839ac3980f8f . Recover the AddrSpaceCast.
This fixes #86791 .
---
Full diff: https://github.com/llvm/llvm-project/pull/119246.
https://github.com/JOE1994 created
https://github.com/llvm/llvm-project/pull/119246
A necessary AddrSpaceCast was wrongfully deleted in
5c91b2886f6bf400b60ca7839069839ac3980f8f . Recover the AddrSpaceCast.
This fixes #86791 .
>From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00
30 matches
Mail list logo