[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] Upstream Vector support in elementTypeIfVector (PR #140125)

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

[clang] [CIR] Upstream Vector support in elementTypeIfVector (PR #140125)

2025-05-15 Thread Amr Hesham via cfe-commits
@@ -54,10 +54,12 @@ namespace direct { namespace { /// If the given type is a vector type, return the vector's element type. /// Otherwise return the given type unchanged. -// TODO(cir): Return the vector element type once we have support for vectors -// instead of the identity

[clang] [CIR] Fix using getElementType (PR #140177)

2025-05-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140177 Fix for elementTypeIfVector Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFon

[clang] [CIR] Fix using getElementType (PR #140177)

2025-05-15 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: I will quickly merge it as a fix for the previous elementTypeIfVector PR to make it buildable https://github.com/llvm/llvm-project/pull/140177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [CIR] Fix using getElementType (PR #140177)

2025-05-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/140177 ___ 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-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139444 >From 46d3b466df954eee87a5e5e7df5cb03802d468c7 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 10 May 2025 20:37:05 +0200 Subject: [PATCH 1/2] [CIR] Upstream unary operators for VectorType --- .../

[clang] [CIR] Upstream Vector support in elementTypeIfVector (PR #140125)

2025-05-15 Thread Amr Hesham via cfe-commits
@@ -54,10 +54,12 @@ namespace direct { namespace { /// If the given type is a vector type, return the vector's element type. /// Otherwise return the given type unchanged. -// TODO(cir): Return the vector element type once we have support for vectors -// instead of the identity

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

2025-05-15 Thread Amr Hesham via cfe-commits
@@ -400,4 +400,165 @@ void foo9() { // OGCG: %[[TMP_A:.*]] = load <4 x i32>, ptr %[[VEC_A]], align 16 // OGCG: %[[TMP_B:.*]] = load <4 x i32>, ptr %[[VEC_B]], align 16 // OGCG: %[[SHR:.*]] = ashr <4 x i32> %[[TMP_A]], %[[TMP_B]] -// OGCG: store <4 x i32> %[[SHR]], ptr %[[SHR_RE

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

2025-05-15 Thread Amr Hesham via cfe-commits
@@ -1076,20 +1074,41 @@ mlir::LogicalResult CIRToLLVMUnaryOpLowering::matchAndRewrite( rewriter.replaceOp(op, adaptor.getInput()); return mlir::success(); case cir::UnaryOpKind::Minus: { - assert(!isVector && - "Add vector handling when vector

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

2025-05-15 Thread Amr Hesham via cfe-commits
@@ -57,7 +57,11 @@ namespace { // TODO(cir): Return the vector element type once we have support for vectors // instead of the identity type. mlir::Type elementTypeIfVector(mlir::Type type) { - assert(!cir::MissingFeatures::vectorType()); + if (auto vecType = mlir::dyn_cast(t

[clang] [CIR] Upstream Vector support in elementTypeIfVector (PR #140125)

2025-05-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140125 Upstream vector support in the element type if vector as a required change for upstreaming other Vec Ops Issue https://github.com/llvm/llvm-project/issues/136487 >From b9f624e508db8349516f909f0c8e9cb85c04

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

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

[clang] [CIR] Upstream Vector support in elementTypeIfVector (PR #140125)

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

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

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

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

2025-05-22 Thread Amr Hesham via cfe-commits
@@ -1427,12 +1427,12 @@ OpFoldResult cir::SelectOp::fold(FoldAdaptor adaptor) { //===--===// LogicalResult cir::ShiftOp::verify() { mlir::Operation *op = getOperation(); - mlir::Type resType = getResult().g

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

2025-05-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/14 Update the verification of ShiftOp for Vector to allow performing shift op between signed and unsigned integers, similar to LLVM IR Issue https://github.com/llvm/llvm-project/issues/136487 >From 2a56a5d8d

[clang] [Clang] Improve testing of non std functions with name infinity (PR #123806)

2025-05-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123806 >From 38031e9aed519f4fd3b21dff7e79c69a0150efd9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 21 Jan 2025 20:11:21 +0100 Subject: [PATCH] [Clang] Improve testing of non std functions with name infi

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

2025-05-23 Thread Amr Hesham via cfe-commits
@@ -1427,13 +1427,13 @@ OpFoldResult cir::SelectOp::fold(FoldAdaptor adaptor) { //===--===// LogicalResult cir::ShiftOp::verify() { mlir::Operation *op = getOperation(); - mlir::Type resType = getResult().g

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

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

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

2025-05-23 Thread Amr Hesham via cfe-commits
@@ -1427,13 +1427,13 @@ OpFoldResult cir::SelectOp::fold(FoldAdaptor adaptor) { //===--===// LogicalResult cir::ShiftOp::verify() { mlir::Operation *op = getOperation(); - mlir::Type resType = getResult().g

<    1   2   3   4   5   >