[clang] [CIR] Fix fallthrough warning (PR #151418)

2025-07-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM, Thanks https://github.com/llvm/llvm-project/pull/151418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

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

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-30 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,325 @@ +// complex-range basic +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -complex-range=basic -Wno-unused-value -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE-BASIC %s +/

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

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

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150834 This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 59063f1e4e73eb0c4dfe6d74393ed496c2c3e7be Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun,

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

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

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-07-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150759 This change adds support for Plus & Minus CompoundAssignment for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From cc8134454578899c228634799f6150c03b0fb403 Mon Sep 17 00:00:00 2001 From

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

2025-07-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150758 This fixes a warning where a variable assigned in 'if' statement wasn't referenced again. >From 5905c9dd5fd3c2b5428002134cdc736cd31cc889 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
@@ -1208,6 +1208,16 @@ cir::GlobalOp CIRGenModule::getGlobalForStringLiteral(const StringLiteral *s, return gv; } +void CIRGenModule::emitExplicitCastExprType(const ExplicitCastExpr *e, +CIRGenFunction *cgf) { + // Bind VLAs in t

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150668 >From 2858cdcc7f217e59a5ebf6e6b6afbd3e9bdc6deb Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 25 Jul 2025 19:49:11 +0200 Subject: [PATCH 1/2] [CIR] Implement LValueBitcast for ComplexType --- clan

[clang] [CIR] Add support for C++ initializer lists (PR #150681)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/150681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150668 This change adds support for LValueBitcast for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 2858cdcc7f217e59a5ebf6e6b6afbd3e9bdc6deb Mon Sep 17 00:00:00 2001 From: AmrDeveloper Dat

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150281 >From 19a9d55e62b829de872c152c40f41a4459bc8c45 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 23 Jul 2025 19:59:07 +0200 Subject: [PATCH 1/2] [CIR] Upstream Unary Plus & Minus op for ComplexType --

[clang] [CIR] Upstream Support Init ComplexType from 1 size InitList (PR #150293)

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

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

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

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

2025-07-24 Thread Amr Hesham via cfe-commits
@@ -326,3 +326,28 @@ void complex_to_complex_cast() { // OGCG: store i32 %[[REAL_INT_CAST]], ptr {{.*}}, align 4 // OGCG: store i32 %[[IMAG_INT_CAST]], ptr getelementptr inbounds nuw ({ i32, i32 }, ptr {{.*}}, i32 0, i32 1), align 4 + +void lvalue_to_rvalue_bitcast() { + voi

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

2025-07-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150296 >From 670aae7394804492de6c86b6068a650391de7004 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 23 Jul 2025 21:48:16 +0200 Subject: [PATCH 1/2] [CIR] Implement CK_LValueToRValueBitCast for ComplexType

[clang] [CIR] Upstream Support Init ComplexType from 1 size InitList (PR #150293)

2025-07-24 Thread Amr Hesham via cfe-commits
@@ -60,7 +60,7 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitDeclRefExpr(DeclRefExpr *e); mlir::Value VisitGenericSelectionExpr(GenericSelectionExpr *e); mlir::Value VisitImplicitCastExpr(ImplicitCastExpr *e); - mlir::Value VisitInitListExpr(const

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

2025-07-24 Thread Amr Hesham via cfe-commits
@@ -82,6 +82,17 @@ class ComplexExprEmitter : public StmtVisitor { } mlir::Value VisitUnaryDeref(const Expr *e); + + mlir::Value VisitUnaryPlus(const UnaryOperator *e, + QualType promotionType = QualType()); AmrDeveloper wrote

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

2025-07-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150296 This change adds support for CK_LValueToRValueBitCast for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 670aae7394804492de6c86b6068a650391de7004 Mon Sep 17 00:00:00 2001 From: AmrDev

[clang] [CIR] Upstream Support Init ComplexType from 1 size InitList (PR #150293)

2025-07-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150293 This change adds support for init ComplexType from InitList with 1 size https://github.com/llvm/llvm-project/issues/141365 >From cdbeea744cf63c1223d9fc9bf994ab9dc5ad6dbf Mon Sep 17 00:00:00 2001 From: AmrD

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

2025-07-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150281 This change adds support for Unary Plus & Minus op for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 19a9d55e62b829de872c152c40f41a4459bc8c45 Mon Sep 17 00:00:00 2001 From: AmrDevelo

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

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

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-23 Thread Amr Hesham via cfe-commits
@@ -164,14 +173,106 @@ LValue ComplexExprEmitter::emitBinAssignLValue(const BinaryOperator *e, mlir::Value ComplexExprEmitter::emitCast(CastKind ck, Expr *op, QualType destTy) { switch (ck) { + case CK_Dependent: +llvm_unreachabl

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149717 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 20 Jul 2025 16:58:13 +0200 Subject: [PATCH 1/9] [CIR] Upstream Cast kinds for ComplexType --- clang/in

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-22 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,310 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir -

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149717 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 20 Jul 2025 16:58:13 +0200 Subject: [PATCH 1/7] [CIR] Upstream Cast kinds for ComplexType --- clang/in

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149717 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 20 Jul 2025 16:58:13 +0200 Subject: [PATCH 1/4] [CIR] Upstream Cast kinds for ComplexType --- clang/in

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
@@ -24,11 +25,118 @@ struct LoweringPreparePass : public LoweringPrepareBase { void runOnOperation() override; void runOnOp(mlir::Operation *op); + void lowerCastOp(cir::CastOp op); void lowerUnaryOp(cir::UnaryOp op); }; } // namespace +static mlir::Value lowerS

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
@@ -114,19 +92,42 @@ void LoweringPreparePass::lowerCastOp(cir::CastOp op) { break; case cir::CastKind::float_complex_to_real: - case cir::CastKind::int_complex_to_real: - case cir::CastKind::float_complex_to_bool: + case cir::CastKind::int_complex_to_real: { +low

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
@@ -114,19 +92,42 @@ void LoweringPreparePass::lowerCastOp(cir::CastOp op) { break; case cir::CastKind::float_complex_to_real: - case cir::CastKind::int_complex_to_real: - case cir::CastKind::float_complex_to_bool: + case cir::CastKind::int_complex_to_real: { +low

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
@@ -207,6 +300,49 @@ void ComplexExprEmitter::emitStoreOfComplex(mlir::Location loc, mlir::Value val, builder.createStore(loc, val, destAddr); } +mlir::Value ComplexExprEmitter::emitComplexToComplexCast(mlir::Value val, +

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149717 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 20 Jul 2025 16:58:13 +0200 Subject: [PATCH 1/3] [CIR] Upstream Cast kinds for ComplexType --- clang/in

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
@@ -207,6 +300,49 @@ void ComplexExprEmitter::emitStoreOfComplex(mlir::Location loc, mlir::Value val, builder.createStore(loc, val, destAddr); } +mlir::Value ComplexExprEmitter::emitComplexToComplexCast(mlir::Value val, +

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149717 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 20 Jul 2025 16:58:13 +0200 Subject: [PATCH 1/2] [CIR] Upstream Cast kinds for ComplexType --- clang/in

[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

2025-07-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/149717 This change adds support for cast kinds for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 8a3e3e87ef31fd347eb70f853a112af5d3c11630 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date:

[clang] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec (PR #149566)

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

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

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

[clang] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec (PR #149566)

2025-07-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/149566 >From 4785b739bc6fcb5783eb0aadf04b29e84b3e2580 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 18 Jul 2025 20:48:01 +0200 Subject: [PATCH 1/2] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComp

[clang] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec (PR #149566)

2025-07-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > LGTM > > We should make this same change in > `ScalarExprEmitter::EmitScalarPrePostIncDec` I will update it too https://github.com/llvm/llvm-project/pull/149566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec (PR #149566)

2025-07-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: Ref: https://github.com/llvm/llvm-project/pull/149162?notification_referrer_id=NT_kwDOAWiXU7QxNzYzMDMzMTI0NjoyMzYzMTY5OQ#discussion_r2215824816 https://github.com/llvm/llvm-project/pull/149566 ___ cfe-commits mailing list cfe-commi

[clang] [CIR][NFC] Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec (PR #149566)

2025-07-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/149566 Replace bool by cir::UnaryOpKind in emitComplexPrePostIncDec >From 4785b739bc6fcb5783eb0aadf04b29e84b3e2580 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 18 Jul 2025 20:48:01 +0200 Subject: [PATCH

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

2025-07-18 Thread Amr Hesham via cfe-commits
@@ -56,6 +56,26 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitParenExpr(ParenExpr *e); mlir::Value VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *e); + + mlir::Value VisitPrePostIncDec(const UnaryOperator *e, bool isInc, +

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

2025-07-18 Thread Amr Hesham via cfe-commits
@@ -56,6 +56,26 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitParenExpr(ParenExpr *e); mlir::Value VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *e); + + mlir::Value VisitPrePostIncDec(const UnaryOperator *e, bool isInc, +

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148943 >From a83dcd3f747751cf1da861405572fbe94ff6c8f9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 21:47:30 +0200 Subject: [PATCH 1/2] [CIR] Upstream CompoundLiteralExpr for Scalar --- clan

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

2025-07-18 Thread Amr Hesham via cfe-commits
@@ -56,6 +56,26 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitParenExpr(ParenExpr *e); mlir::Value VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *e); + + mlir::Value VisitPrePostIncDec(const UnaryOperator *e, bool isInc, +

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148943 >From a83dcd3f747751cf1da861405572fbe94ff6c8f9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 21:47:30 +0200 Subject: [PATCH 1/2] [CIR] Upstream CompoundLiteralExpr for Scalar --- clan

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-17 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll +// RUN:

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148943 >From 12eae63493a66a2f780ed846ce0fbc0df6de00ce Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 21:47:30 +0200 Subject: [PATCH 1/2] [CIR] Upstream CompoundLiteralExpr for Scalar --- clan

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-17 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll +// RUN:

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

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

[clang] [CIR] Upstream builtin_conj for ComplexType (PR #149170)

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

[clang] [CIR] Upstream builtin_conj for ComplexType (PR #149170)

2025-07-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/149170 This change adds support for builtin_conj for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 2965c5b9f3684b321aa654105e2854d1711f8274 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

2025-07-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/149162 This change adds support for unary inc/dec operators for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From f4ceabdb20a3104166aa0682d69fedbcfe0a6f34 Mon Sep 17 00:00:00 2001 From: AmrDeve

[clang] [CIR] Upstream unary not for ComplexType (PR #148857)

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

[clang] [CIR] Upstream CompoundLiteralExpr for Scalar (PR #148943)

2025-07-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148943 Upstream CompoundLiteralExpr for Scalar as a prerequisite for CompoundLiteralExpr for ComplexType >From 12eae63493a66a2f780ed846ce0fbc0df6de00ce Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 J

[clang] [CIR][NFC] Fix LoweringPrepare pass multi lines summary (PR #148826)

2025-07-15 Thread Amr Hesham via cfe-commits
@@ -73,8 +73,8 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> { } def LoweringPrepare : Pass<"cir-lowering-prepare"> { - let summary = "Lower to more fine-grained CIR operations before lowering to -other dialects"; + let summary = "Lower to more fine-grained CIR operatio

[clang] [CIR] Upstream unary not for ComplexType (PR #148857)

2025-07-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148857 >From 8d328786bdfc80f348fd6c4159ac54c343a28ae9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 16:16:34 +0200 Subject: [PATCH 1/2] [CIR] Upstream unary not for ComplexType --- .../CIR/D

[clang] [CIR] Upstream unary not for ComplexType (PR #148857)

2025-07-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148857 Upstream unary not for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 8d328786bdfc80f348fd6c4159ac54c343a28ae9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 16:1

[clang] [CIR][NFC] Fix LoweringPrepare pass multi lines summary (PR #148826)

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

[clang] [CIR][NFC] Fix LoweringPrepare pass multi lines summary (PR #148826)

2025-07-15 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: I will quickly merge to make it buildable again https://github.com/llvm/llvm-project/pull/148826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix LoweringPrepare pass multi lines summary (PR #148826)

2025-07-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148826 Fix the Lowering Prepare a multi-line summary >From 10a58ba4f1872a7ea6ba302178dfe48625584a5f Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 15 Jul 2025 13:12:10 +0200 Subject: [PATCH] [CIR][NFC] Fi

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

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

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

2025-07-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144236 >From 8fc31d0c3e1797fa6887ac8831c2e0eaadfb64fa Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 12 Jul 2025 00:56:36 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexImagPtrOp for ComplexType --- cl

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

2025-07-14 Thread Amr Hesham via cfe-commits
@@ -2642,6 +2642,36 @@ def ComplexRealPtrOp : CIR_Op<"complex.real_ptr", [Pure]> { let hasVerifier = 1; } +//===--===// +// ComplexImagPtrOp +//===---

[clang] [CIR] Upstream the basic structure of LoweringPrepare pass (PR #148545)

2025-07-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148545 Upstream, the basic structure of the LoweringPrepare pass as a prerequisite for other ComplexType PR's https://github.com/llvm/llvm-project/issues/141365 >From 46579b053f7f0a95d11a06406b25e04a5ba3806f Mon

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

2025-07-13 Thread Amr Hesham via cfe-commits
@@ -1775,6 +1775,44 @@ OpFoldResult cir::ComplexCreateOp::fold(FoldAdaptor adaptor) { return cir::ConstComplexAttr::get(realAttr, imagAttr); } +//===--===// AmrDeveloper wrote: I am not su

[clang] [CIR] Implement SubOp for ComplexType (PR #148025)

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

[clang] [CIR] Implement SubOp for ComplexType (PR #148025)

2025-07-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148025 >From 3658e227161dc3e2cf0a6d7f21d008df6509e9c2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 10 Jul 2025 20:37:25 +0200 Subject: [PATCH 1/2] [CIR] Implement SubOp for ComplexType --- clang/includ

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

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

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

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

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

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

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From 1543f10164d64c28951ae4fff396f58877c43f74 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexRealPtrOp for ComplexType --- cla

[clang] [CIR] Implement SubOp for ComplexType (PR #148025)

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148025 >From c430b7dd359ffbc9e356ab242d18554830ed5ee2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 10 Jul 2025 20:37:25 +0200 Subject: [PATCH 1/2] [CIR] Implement SubOp for ComplexType --- clang/includ

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

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

[clang] [CIR] Fold ComplexImagOp from ComplexCreateOp (PR #148010)

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

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148033 >From 0f584ac188b3c6eb9cc61ffc44464741360ff9c0 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 10 Jul 2025 20:52:04 +0200 Subject: [PATCH 1/2] [CIR] Use ZeroAttr as zeroinitializer for ComplexType -

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148033 Use ZeroAttr as a zeroinitializer for ComplexType, similar to what we did in CXXScalarValueInitExpr https://github.com/llvm/llvm-project/issues/141365 >From 0f584ac188b3c6eb9cc61ffc44464741360ff9c0 Mon Se

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147592 >From 316b23e92cf55a407fdaa7d9aa5fd92a24754fee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 22:07:09 +0200 Subject: [PATCH 1/3] [CIR] Fold ComplexRealOp from ComplexCreateOp --- clang

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From acab11ee6a8e8041dab689c5518229e358d4f5a1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexRealPtrOp for ComplexType --- cla

[clang] [CIR] Implement AddOp for ComplexType (PR #147578)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147578 >From d91ac481a20e71275b441a9b9a7712aa9dfd270b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 20:00:08 +0200 Subject: [PATCH 1/4] [CIR] Implement AddOp for ComplexType --- clang/include

[clang] [CIR] Upstream __builtin_cimag for ComplexType (PR #147808)

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

[clang] [CIR] Implement AddOp for ComplexType (PR #147578)

2025-07-10 Thread Amr Hesham via cfe-commits
@@ -2521,6 +2521,32 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> { let hasFolder = 1; } +//===--===// +// ComplexAddOp +//===--===

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-09 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: I updated the case `__real__ a + __real__ b` to be handled using `ComplexRealOp` because we actually need the value, and it aligned with ComplexDialect, but I think for cases like RValue `__real__ c = 10;` or `int* rp = &__real__ c` we want the result of the op to be pointe

[clang] [CIR] Implement AddOp for ComplexType (PR #147578)

2025-07-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147578 >From d91ac481a20e71275b441a9b9a7712aa9dfd270b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 20:00:08 +0200 Subject: [PATCH 1/2] [CIR] Implement AddOp for ComplexType --- clang/include

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-09 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > We just went through a similar one with vector (in which the folding to > constant vector (from a splat op) can actually increase code size) Yes, I think for the current fold it has no side effect on size, it will eleminate one Inst, because that i added it to the folder

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147592 >From 316b23e92cf55a407fdaa7d9aa5fd92a24754fee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 22:07:09 +0200 Subject: [PATCH 1/2] [CIR] Fold ComplexRealOp from ComplexCreateOp --- clang

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147592 >From 316b23e92cf55a407fdaa7d9aa5fd92a24754fee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 22:07:09 +0200 Subject: [PATCH 1/2] [CIR] Fold ComplexRealOp from ComplexCreateOp --- clang

[clang] [CIR] Upstream __builtin_creal for ComplexType (PR #146927)

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

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/147592 Folding ComplexRealOp if the operand is ComplexCreateOp, inspired by MLIR Complex dialect Ref: https://github.com/llvm/llvm-project/blob/8b65c9d1ed298a9f4be675d1da9d678fd61ff2b0/mlir/lib/Dialect/Complex/I

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

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

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
@@ -165,12 +165,8 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) { mlir::Value ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) { mlir::Location loc = cgf.getLoc(e->getExprLoc()); - QualType complexElemTy = - e->getType()->c

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
@@ -161,6 +162,17 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) { return Visit(e->getChosenSubExpr()); } +mlir::Value +ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) { + mlir::Location loc = cgf.getLoc(e->getExprLoc()); + Qu

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147143 >From d8c01a7c98bea2440ab8b704501f7e3efb33549d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025 14:27:21 +0200 Subject: [PATCH 1/2] [CIR] Implement CXXScalarValueInitExpr for ComplexType -

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From acab11ee6a8e8041dab689c5518229e358d4f5a1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH] [CIR] Upstream ComplexRealPtrOp for ComplexType --- clang/i

[clang] [CIR] Implement AbstractConditionalOperator for ComplexType (PR #147090)

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

[clang] [CIR] Implement AbstractConditionalOperator for ComplexType (PR #147090)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147090 >From 41e529de4636663cedc01375288cb5a22cd5cfb6 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 4 Jul 2025 19:13:58 +0200 Subject: [PATCH] [CIR] Implement AbstractConditionalOperator for ComplexType

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

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

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147147 >From bb6602546c35f6a25a4a64141ec9d1edff65dd95 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025 15:56:31 +0200 Subject: [PATCH 1/2] [CIR] Implement functional cast to ComplexType --- clan

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/147147 Implement functional cast to ComplexType https://github.com/llvm/llvm-project/issues/141365 >From bb6602546c35f6a25a4a64141ec9d1edff65dd95 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025

  1   2   3   4   5   6   7   8   >