[clang] [CIR] Upstream emitAndUpdateRetAlloca (PR #129933)

2025-03-08 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I have mixed feelings about this change. It mostly overlaps with what I am > working on, which is class `LexicalScope`, which has a bunch of the code for > handling the return value. I think I would prefer that this PR be dropped, as > the changes will be part of the PR I

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-09 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: There will be two upcoming patches. 1 - Initializing const array and zero initializing support (Depends on upstreaming `ConstantEmitter` and `ZeroAttr`) 2 - Dynamic-size arrays, and accessing arrays using the `cir.ptr_stride` operation (Depends on upstreaming `CastOp`) ht

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/130502 This change adds the basic support for ArrayType Issue #130197 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PAT

[clang] [CIR] Upstream emitAndUpdateRetAlloca (PR #129933)

2025-03-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/129933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/129285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
@@ -202,6 +202,18 @@ mlir::Type CIRGenTypes::convertType(QualType type) { break; } + case Type::ConstantArray: { +const ConstantArrayType *arrTy = cast(ty); +mlir::Type elemTy = convertTypeForMem(arrTy->getElementType()); + +// FIXME: In LLVM, "lower arrays

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129116 Fix structured binding shadows template parameter location Fixes: #129060 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 S

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @shafik I added the sample to our test cases, not sure if we can add source loc in expected line, I will check that https://github.com/llvm/llvm-project/pull/129116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129285 Improve the diagnostics for chained comparisons to report actual expressions and operators Fixes #129069 >From 66cd32d7c58976bf050f82c0b6af39bc2b838a74 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: F

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129116 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 Subject: [PATCH 1/2] [Clang][diagnostics] Fix structured binding shadows tem

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Amr Hesham via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} AmrDeveloper wrote: Yes i think the word `like` should be removed here, but I am thinking should we prefer the previous diagnostics or the one with actual

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-03-01 Thread Amr Hesham via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-03-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129304 >From d13f2d0d40987302243efad7304a1a006fdb2dde Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 28 Feb 2025 21:42:36 +0100 Subject: [PATCH 1/2] [CIR] Upstream floating point literal expressions ---

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-01 Thread Amr Hesham via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} AmrDeveloper wrote: Yes, I got your point also it will not be great with large expressions :D, I am thinking should we change the message to be different

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130847 >From 337b23e5ddb8ad9ef470e9c62d6fc136ccb070ee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Mar 2025 22:42:28 +0100 Subject: [PATCH 1/4] [CIR] Upstream basic support for sizeof and alignof ---

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-13 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: I updated the test to include fixed size ArrayType https://github.com/llvm/llvm-project/pull/130847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @AaronBallman If releasenote is okey, i can merge now :D https://github.com/llvm/llvm-project/pull/126793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129285 >From 7a61f41a3104dd0765dea9930e0cf6f94d656598 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 28 Feb 2025 19:27:41 +0100 Subject: [PATCH 1/3] [Clang][diagnostics] Improve the diagnostics for chained

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/126793 >From cfa6bfb6ae5834f251d8e0c2c0f447aa82c97ef2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Feb 2025 21:30:18 +0100 Subject: [PATCH 1/2] [Clang][ASTMatcher] Improve matching isDerivedFrom base

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > LGTM, but you should add a release note to `clang/docs/ReleaseNotes.rst` so > users know about the change in behavior. Thank you, I added a release note, once you confirm it's approved I can land after CI is green https://github.com/llvm/llvm-project/pull/126793

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/126793 >From cfa6bfb6ae5834f251d8e0c2c0f447aa82c97ef2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Feb 2025 21:30:18 +0100 Subject: [PATCH 1/3] [Clang][ASTMatcher] Improve matching isDerivedFrom base

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/126793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream emitAndUpdateRetAlloca (PR #129933)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129933 This change adds support for the basic case of emitAndUpdateRetAlloca >From 1db2baafe9ed0ab360517810144300db0e7410f6 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 5 Mar 2025 18:18:07 +0100 Subject

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/4] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/130847 This change adds the essential support for sizeof and alignof operators - Support for VariableArrayType can be added after closing #130197 >From 337b23e5ddb8ad9ef470e9c62d6fc136ccb070ee Mon Sep 17 00:00:0

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
@@ -369,6 +369,22 @@ BoolType::getABIAlignment(const ::mlir::DataLayout &dataLayout, return 1; } +//===--===// +// Definitions +//===--==

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > My concern is still not fixed, and Andy/Bruno still have comments here, so I > don't believe this to be ready yet. I already addressed all comments except the test for Size and it's need sizeof PR to merge, and the assert line which we need to agree on, other than that e

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130847 >From 337b23e5ddb8ad9ef470e9c62d6fc136ccb070ee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Mar 2025 22:42:28 +0100 Subject: [PATCH 1/3] [CIR] Upstream basic support for sizeof and alignof ---

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-12 Thread Amr Hesham via cfe-commits
@@ -148,3 +150,27 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce) { } return {}; } + +/// Return the size or alignment of the type of argument of the sizeof +/// expression as an integer. +mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( +con

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/6] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/6] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
@@ -33,6 +33,15 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/5] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-31 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/133100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/7] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 01/10] [CIR] [Upstream local initialization for ArrayType --

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-03 Thread Amr Hesham via cfe-commits
@@ -110,6 +110,8 @@ class CIRGenFunction : public CIRGenTypeCache { public: mlir::Value createDummyValue(mlir::Location loc, clang::QualType qt); + void emitNullInitialization(mlir::Location loc, Address destPtr, QualType ty); AmrDeveloper wrote: Thank yo

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/133100 >From b4aafe8bdb2754597d440e256c33b9f8b9a92a91 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 26 Mar 2025 05:52:17 -0700 Subject: [PATCH 1/2] [CIR] Upstream zero init for global variables --- .../

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/6] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/6] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/8] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] Upstream extract op for VectorType (PR #138413)

2025-05-07 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @bcardosolopes, I think we can finish this PR, and I will continue searching for a test case for folding without blocking upstreaming other Vector Ops. Also, I think the same idea can be applied to Arrays, what do you think? https://github.com/llvm/llvm-project/pull/138413

[clang] [CIR] Implement folder for VecExtractOp (PR #139304)

2025-05-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/139304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream insert op for VectorType (PR #139146)

2025-05-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139146 >From 11de7d363ae9f06e98f15fc5c492e74a660693f8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 8 May 2025 22:10:39 +0200 Subject: [PATCH 1/3] [CIR] Upstream insert op for VectorType --- clang/inclu

[clang] [CIR] Implement foldder for VecExtractOp (PR #139304)

2025-05-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139304 This change adds a folder for the VecExtractOp Issue https://github.com/llvm/llvm-project/issues/136487 >From 6a21dc2a983094f61a54755454d12c45cf074c9d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-10 Thread Amr Hesham via cfe-commits
@@ -15901,6 +15901,13 @@ ExprResult SemaOpenMP::VerifyPositiveIntegerConstantInClause( << E->getSourceRange(); return ExprError(); } + + if (!Result.isRepresentableByInt64()) { AmrDeveloper wrote: In our implementation, yes, because we const ev

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 >From 793bd974b779450a84c72d54237067ab56a59cdc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 5 May 2025 23:01:02 +0200 Subject: [PATCH 1/5] [clang][OpenMP] Add error for large expr in collapse ---

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 >From 793bd974b779450a84c72d54237067ab56a59cdc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 5 May 2025 23:01:02 +0200 Subject: [PATCH 1/4] [clang][OpenMP] Add error for large expr in collapse ---

[clang] [CIR] Upstream extract op for VectorType (PR #138413)

2025-05-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138413 >From d0a6c4fa94d387d8c9afec10deae150d6bce54ee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 3 May 2025 13:43:04 +0200 Subject: [PATCH 1/3] [CIR] Upstream extract op for VectorType --- clang/incl

[clang] [CIR] Upstream extract op for VectorType (PR #138413)

2025-05-07 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > > > Overall looks good. While here, can you please implement a folder for > > > this operation? It should kick-in if both idx and input vector are > > > constants. > > > > > > @bcardosolopes I implement it like this snippet > > ``` > > OpFoldResult cir::VecExtractOp::fol

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -213,3 +213,68 @@ void foo4() { // OGCG: %[[TMP2:.*]] = load i32, ptr %[[IDX]], align 4 // OGCG: %[[ELE:.*]] = extractelement <4 x i32> %[[TMP1]], i32 %[[TMP2]] // OGCG: store i32 %[[ELE]], ptr %[[INIT]], align 4 + +void foo9() { AmrDeveloper wrote: Both of

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/138592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream insert op for VectorType (PR #139146)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/139146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper deleted https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139465 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 >From af3e49f1290c61d5856a5ddf600cfd19ef485e25 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 5 May 2025 23:01:02 +0200 Subject: [PATCH 1/3] [clang][OpenMP] Add error for large expr in collapse ---

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-08 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > In addition to the collapse clause, the ordered clause also seems to have the > same problem. For example, does your patch also fix the following crash? If > so, you also need tests regarding the ordered clause. > https://godbolt.org/z/96sa5jxff > > ```c++ > void f(void)

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139465 This change adds support for shift ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 Rate limit · GitHub body { background-color: #

[clang] [CIR] Upstream insert op for VectorType (PR #139146)

2025-05-09 Thread Amr Hesham via cfe-commits
@@ -1969,6 +1969,43 @@ def VecCreateOp : CIR_Op<"vec.create", [Pure]> { let hasVerifier = 1; } +//===--===// +// VecInsertOp +//===--===//

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-09 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > Thank you for the fix! I've added a few more reviewers. This is a pretty > general problem, so I think we may want additional test coverage for > basically any of the OpenMP clauses which accept an integer argument. For > example, this is another related issue: #139268 --

[clang] [CIR] Upstream insert op for VectorType (PR #139146)

2025-05-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139146 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139444 This change adds support for unary ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From 9fd2f92f9122c8c79c4977e00dab93bfaa468787 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Da

[clang] [CIR] Upstream insert op for VectorType (PR #139146)

2025-05-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139146 This change adds an insert op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 Rate limit · GitHub body { background-color: #f6f8fa;

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][LLVMLowering] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139444 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139827 This change adds support for splat op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From e9b7f553f7ad8a9167a9aa4a11c86ccdb8472cdd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Dat

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: More test cases will be added when Bin and Comp operators are upstreamed for Vector https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/140099 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140099 This change adds support for binary ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 Rate limit · GitHub body { background-color:

[clang] [CIR][LLVMLowering] Upstream Bitcast lowering (PR #140774)

2025-05-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/140774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][LLVMLowering] Upstream Bitcast (PR #140774)

2025-05-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140774 This change adds support for lowering BitCastOp >From 5e5676c1e3efe38bceb09ca90a4e4b7500cbb6e8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 20 May 2025 19:29:32 +0200 Subject: [PATCH] [CIR][LL

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-20 Thread Amr Hesham via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-20 Thread Amr Hesham via cfe-commits
@@ -587,3 +587,118 @@ void foo11() { // OGCG: %[[TMP_B:.*]] = load <4 x i32>, ptr %[[VEC_B]], align 16 // OGCG: %[[XOR:.*]] = xor <4 x i32> %[[TMP_A]], %[[TMP_B]] // OGCG: store <4 x i32> %[[XOR]], ptr {{.*}}, align 16 + +void foo12() { AmrDeveloper wrote: Uns

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/140597 >From e43d04b1eb1660dcf1a99d405858efd3a9647657 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 18 May 2025 21:14:03 +0200 Subject: [PATCH 1/2] [CIR] Upstream comparion ops for VectorType --- clang/

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-20 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: - Test cases for Unsigned and FP will be added after merging: https://github.com/llvm/llvm-project/pull/140774 - There will be a follow-up PR for folding https://github.com/llvm/llvm-project/pull/140597 ___ cfe-commits mailing list

[clang] [CIR][LLVMLowering] Upstream unary operators for VectorType (PR #139444)

2025-05-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/139444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/140099 >From ab09038c757369b0ecc6c968bb50debdc024b1ce Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 14 May 2025 22:25:09 +0200 Subject: [PATCH 1/3] [CIR][LLVMLowering] Upstream binary operators for Vecto

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/140099 >From ab09038c757369b0ecc6c968bb50debdc024b1ce Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 14 May 2025 22:25:09 +0200 Subject: [PATCH 1/3] [CIR][LLVMLowering] Upstream binary operators for Vecto

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-19 Thread Amr Hesham via cfe-commits
@@ -2037,4 +2037,37 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure, let hasFolder = 1; } + +//===--===// +// VecSplat +//===--===// + +/

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/140099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-19 Thread Amr Hesham via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [CIR] Upstream comparion ops for VectorType (PR #140597)

2025-05-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140597 This change adds support for Cmp ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From e43d04b1eb1660dcf1a99d405858efd3a9647657 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/141411 This change adds support for the Dynamic Shuffle op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From 12295ee3a5613d7473ab33a4579015a2217617a0 Mon Sep 17 00:00:00 2001 From: Amr

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-25 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: There will be a follow-up PR for folding https://github.com/llvm/llvm-project/pull/141411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/3] [CIR] Upstream global initialization for ComplexType --

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/2] [CIR] Upstream global initialization for ComplexType --

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/141369 This change adds support for zero and global init for ComplexType #141365 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 S

[clang] [CIR] Allow use different Int types together in Vec Shift Op (PR #141111)

2025-05-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/14 >From 05ef5317602f61debe9a4d853e61a7e508a5a00d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 22 May 2025 19:38:08 +0200 Subject: [PATCH 1/5] [CIR] Allow use different Int types together in Vec Shif

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-24 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: - This PR has implementation for the global init Complex value. I will backport it to the incubator once it is merged. - Not totally sure if it's good idea or not to rename it to `ConstComplexAttr` similar to Const Array, Vector and Record, We can discuss it 👍🏻 https://gi

<    1   2   3   4   5   >