[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-26 Thread via cfe-commits
asmok-g wrote: Hello, Some of our targets in Google are broken by tho original patch and we need this fix patch to unblock our internal releases. Can we land the fix soonish ? Thanks https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits ma

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-26 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/128166 >From 77db8a15d472e112be93cb7566cf56e26dc80501 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 21 Feb 2025 13:47:42 +0200 Subject: [PATCH 1/5] Handle HLL casts on sret args, remove ill advised cast strip a

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-26 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/128166 >From 77db8a15d472e112be93cb7566cf56e26dc80501 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 21 Feb 2025 13:47:42 +0200 Subject: [PATCH 1/5] Handle HLL casts on sret args, remove ill advised cast strip a

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-26 Thread Alex Voicu via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I think it's reasonable and we should probably get this in before the release > window. The release branch reverted the original offending patch, so we don't need this or the other follow up patches https://github.com/llvm/llvm-project/pull/128166

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 milestoned https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I think it's reasonable and we should probably get this in before the release window. https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,38 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --version 5 +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-t

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,32 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa-gnu -target-cpu gfx900 -emit-llvm -o - %s | FileCheck %s + +struct X { int z[17]; }; + +// CHECK-LABEL: define dso_

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,38 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --version 5 +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-t

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/128166 >From 77db8a15d472e112be93cb7566cf56e26dc80501 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 21 Feb 2025 13:47:42 +0200 Subject: [PATCH 1/4] Handle HLL casts on sret args, remove ill advised cast strip a

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,38 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --version 5 +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-t

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/128166 >From 77db8a15d472e112be93cb7566cf56e26dc80501 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 21 Feb 2025 13:47:42 +0200 Subject: [PATCH 1/3] Handle HLL casts on sret args, remove ill advised cast strip a

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/128166 >From 77db8a15d472e112be93cb7566cf56e26dc80501 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 21 Feb 2025 13:47:42 +0200 Subject: [PATCH 1/2] Handle HLL casts on sret args, remove ill advised cast strip a

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Matt Arsenault via cfe-commits
@@ -5163,6 +5163,20 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } } if (IRFunctionArgs.hasSRetArg()) { + // A mismatch between the allocated return value's AS and the target's + // chosen IndirectAS can happen e.g. when passing t

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Matt Arsenault via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,32 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa-gnu -target-cpu gfx900 -emit-llvm -o - %s | FileCheck %s + +struct X { int z[17]; }; + +// CHECK-LABEL: define dso_

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Matt Arsenault via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,38 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --version 5 +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-t

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Alex Voicu (AlexVlx) Changes This addresses two issues introduced by moving indirect args into an explicit AS (please see ; and

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/128166 This addresses two issues introduced by moving indirect args into an explicit AS (please see and