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

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -2275,4 +2275,36 @@ def VecTernaryOp : CIR_Op<"vec.ternary", let hasFolder = 1; } +//===--===// +// VecSplatOp +//===--===// + +def VecS

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

2025-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/139827 ___ 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-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecCreateOp (PR #143355)

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -1533,6 +1533,16 @@ LogicalResult cir::GetMemberOp::verify() { // VecCreateOp //===--===// +OpFoldResult cir::VecCreateOp::fold(FoldAdaptor adaptor) { + if (llvm::any_of(getElements(), [](mlir::Value attr

[clang] [CIR] Implement folder for VecCreateOp (PR #143355)

2025-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/143355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecCreateOp (PR #143355)

2025-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/143355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecShuffleOp (PR #143260)

2025-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/143260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CreateOp for ComplexType with folder (PR #143192)

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,81 @@ +#include "CIRGenBuilder.h" +#include "CIRGenFunction.h" + +#include "clang/AST/StmtVisitor.h" + +using namespace clang; +using namespace clang::CIRGen; + +namespace { +class ComplexExprEmitter : public StmtVisitor { + CIRGenFunction &cgf; + CIRGenBuilderTy &bu

[clang] [CIR] Upstream CreateOp for ComplexType with folder (PR #143192)

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,81 @@ +#include "CIRGenBuilder.h" +#include "CIRGenFunction.h" + +#include "clang/AST/StmtVisitor.h" + +using namespace clang; +using namespace clang::CIRGen; + +namespace { +class ComplexExprEmitter : public StmtVisitor { + CIRGenFunction &cgf; + CIRGenBuilderTy &bu

[clang] [CIR] Upstream CreateOp for ComplexType with folder (PR #143192)

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,81 @@ +#include "CIRGenBuilder.h" +#include "CIRGenFunction.h" + +#include "clang/AST/StmtVisitor.h" + +using namespace clang; +using namespace clang::CIRGen; + +namespace { +class ComplexExprEmitter : public StmtVisitor { + CIRGenFunction &cgf; + CIRGenBuilderTy &bu

[clang] [CIR] Upstream CreateOp for ComplexType with folder (PR #143192)

2025-06-10 Thread Henrich Lauko via cfe-commits
@@ -255,7 +255,13 @@ void CIRGenFunction::emitExprAsInit(const Expr *init, const ValueDecl *d, emitScalarInit(init, getLoc(d->getSourceRange()), lvalue); return; case cir::TEK_Complex: { -cgm.errorNYI(init->getSourceRange(), "emitExprAsInit: complex type"); +

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-10 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/143028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-10 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **Jun 10, 7:24 AM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/143028). https://github.com/llvm/llvm-project/pull/143028 _

[clang] [CIR] Extend VecShuffleOp verifier to catch invalid index (PR #143262)

2025-06-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/143262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Extend VecShuffleOp verifier to catch invalid index (PR #143262)

2025-06-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/143262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFS] Add test cases for VecShuffle with -1 index (PR #143304)

2025-06-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/143304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFS] Add test cases for VecShuffle with -1 index (PR #143304)

2025-06-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/143304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecShuffleOp (PR #143260)

2025-06-08 Thread Henrich Lauko via cfe-commits
@@ -1580,9 +1580,49 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) { } //===--===// -// VecShuffle +// VecShuffleOp //===--

[clang] [CIR] Upstream CreateOp for ComplexType with folder (PR #143192)

2025-06-07 Thread Henrich Lauko via cfe-commits
@@ -2226,4 +2226,36 @@ def VecTernaryOp : CIR_Op<"vec.ternary", let hasVerifier = 1; } +//===--===// +// ComplexCreateOp +//===--===// + +d

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-06 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/143028 >From a86eea619ef69932cf017d4ea466bb9008b2f7af Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:59:58 +0200 Subject: [PATCH] [CIR][NFC] Use actual operand name in adaptor-obtained operands This mi

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-06 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/143028 >From c762c461b5994ca2ccc6c07f413c170781634aea Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:59:58 +0200 Subject: [PATCH] [CIR][NFC] Use actual operand name in adaptor-obtained operands This mi

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-06 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/143024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-06 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **Jun 6, 7:57 AM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/143024). https://github.com/llvm/llvm-project/pull/143024 __

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#143028** https://app.graphite.dev/github/pr/llvm/llvm-project/143028?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/143028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/143028 This mirrors incubator changes from https://github.com/llvm/clangir/pull/1661 >From 99a25aa458ee70e88bdf23cfe3ebab3828d4d16a Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:59:58 +0200 Subject: [P

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/143024 >From 4e79e49b2e4ea09d202e4c5995194754ae7b5447 Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:39:49 +0200 Subject: [PATCH] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType(

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/143024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#143024** https://app.graphite.dev/github/pr/llvm/llvm-project/143024?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/143024 This mirrors incubator changes from https://github.com/llvm/clangir/pull/1662 >From 38c7e537b64329bdb8595653bc97e006d7846bfb Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:39:49 +0200 Subject: [P

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

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/141369 ___ 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-06-05 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,41 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-06-05 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,41 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142288 ___ 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-06-05 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,41 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-06-05 Thread Henrich Lauko via cfe-commits
@@ -1883,6 +1884,60 @@ mlir::LogicalResult CIRToLLVMVecCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite( +cir::VecSplatOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) co

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecTernaryOp (PR #142946)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142946 ___ 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-06-05 Thread Henrich Lauko via cfe-commits
@@ -1883,6 +1884,60 @@ mlir::LogicalResult CIRToLLVMVecCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite( +cir::VecSplatOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) co

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

2025-06-05 Thread Henrich Lauko via cfe-commits
@@ -1883,6 +1884,60 @@ mlir::LogicalResult CIRToLLVMVecCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite( +cir::VecSplatOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) co

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142393 ___ 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-06-04 Thread Henrich Lauko via cfe-commits
xlauko wrote: Since https://github.com/llvm/llvm-project/pull/14/ was merged, please mirror additional changes from https://github.com/llvm/clangir/pull/1626 before merging. https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing

[clang] [CIR] Introduce cir::RecordKind::Class (PR #142690)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Introduce cir::RecordKind::Class (PR #142690)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFS] Fix missing return statement warning (PR #142591)

2025-06-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFS] Fix missing return statement warning (PR #142591)

2025-06-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-03 Thread Henrich Lauko via cfe-commits
xlauko wrote: Can you also add test where condition has different vector element type from operands? https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [CIR][NFS] Remove unnecessary constraints asserts in VecCmpOp (PR #142473)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1597,9 +1598,9 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) { elements.reserve(numElements); const uint64_t maskBits = llvm::NextPowerOf2(numElements - 1) - 1; -for (uint64_t i = 0; i < numElements; i++) { - cir::IntAttr idxAttr = m

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1597,9 +1598,9 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) { elements.reserve(numElements); const uint64_t maskBits = llvm::NextPowerOf2(numElements - 1) - 1; -for (uint64_t i = 0; i < numElements; i++) { - cir::IntAttr idxAttr = m

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) { // VecShuffleDynamicOp //===--===// +OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) { + mlir::Attribute v

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public StmtVisitor { e->getSourceRange().getBegin()); } + mlir::Value + VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) { +mlir::Location loc = cgf.getLoc(e->getSourc

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko deleted https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1589,6 +1589,24 @@ LogicalResult cir::VecShuffleDynamicOp::verify() { return success(); } +//===--===// +// VecTernaryOp +//===--===//

[clang] [CIR ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public StmtVisitor { e->getSourceRange().getBegin()); } + mlir::Value + VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) { +mlir::Location loc = cgf.getLoc(e->getSourc

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public StmtVisitor { e->getSourceRange().getBegin()); } + mlir::Value + VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) { +mlir::Location loc = cgf.getLoc(e->getSourc

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1589,6 +1589,24 @@ LogicalResult cir::VecShuffleDynamicOp::verify() { return success(); } +//===--===// +// VecTernaryOp +//===--===//

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -2190,4 +2190,40 @@ def VecShuffleDynamicOp : CIR_Op<"vec.shuffle.dynamic", let hasVerifier = 1; } +//===--===// +// VecTernaryOp +//===

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public StmtVisitor { e->getSourceRange().getBegin()); } + mlir::Value + VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) { xlauko wrote: nit: pull out `c

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm + minor nits https://github.com/llvm/llvm-project/pull/142315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) { // VecShuffleDynamicOp //===--===// +OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) { + mlir::Attribute v

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Henrich Lauko via cfe-commits
xlauko wrote: > * `IntegerVector:$cond` will replaced by `CIR_VectorOfIntType` after merging > [[CIR][NFC] Upstream VectorType support in helper function  > #14](https://github.com/llvm/llvm-project/pull/14) > * there will be a follow up PR for the folder To simplify these kind of depen

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) { // VecShuffleDynamicOp //===--===// +OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) { + mlir::Attribute v

[clang] [CIR][NFC] Upstream VectorType support in helper function (PR #142222)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/14 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Upstream VectorType support in helper function (PR #142222)

2025-06-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/14 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-02 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,21 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
@@ -2156,6 +2157,52 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure, SameTypeOperands]> { }]; } +//===--===// +// VecShuffleOp +//===--===// + +

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,21 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,21 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
xlauko wrote: > `The size of the result vector does not have to match the size of the > individual input vectors or of the concatenated vector.` Quoiting the docs: the result of `__builtin_shufflevector` is a vector with the same element type as `vec1` and `vec2` but that has an element count

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
@@ -2156,6 +2156,50 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure, SameTypeOperands]> { }]; } +//===--===// +// VecShuffleOp +//===--===// + +

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-01 Thread Henrich Lauko via cfe-commits
@@ -2156,6 +2156,50 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure, SameTypeOperands]> { }]; } +//===--===// +// VecShuffleOp +//===--===// + +

[clang] [CIR][NFC] Upstream VectorType support in helper function (PR #142222)

2025-05-31 Thread Henrich Lauko via cfe-commits
xlauko wrote: This partially ports my changes from https://github.com/llvm/clangir/pull/1626 I was originally waiting for other vector stuff to get merged so we don't conflict. Can you please mirror everything that is applicable from that PR? https://github.com/llvm/llvm-project/pull/14 __

[clang] [CIR] Upstream converting vector types (PR #142012)

2025-05-30 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/141973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/141973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr", [TypedAttrInterface]> { }]; } +//===--===// +// VisibilityAttr +//===-

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr", [TypedAttrInterface]> { }]; } +//===--===// +// VisibilityAttr +//===-

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr", [TypedAttrInterface]> { }]; } +//===--===// +// VisibilityAttr +//===-

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-30 Thread Henrich Lauko via cfe-commits
@@ -1643,17 +1644,31 @@ def GlobalOp : CIR_Op<"global"> { described by the type of the variable. The `linkage` tracks C/C++ linkage types, currently very similar to LLVM's. +Symbol visibility in `sym_visibility` is defined in terms of MLIR's visibility +and ve

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **May 29, 10:36 AM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/141830). https://github.com/llvm/llvm-project/pull/141830

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/141830 >From d4026ae9fabe8ee8a5d76a69ba5f89a7f1a7c3ff Mon Sep 17 00:00:00 2001 From: xlauko Date: Wed, 28 May 2025 21:15:58 +0200 Subject: [PATCH 1/3] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/141830 >From a58132702ff7b996d805172144ae1f261495c624 Mon Sep 17 00:00:00 2001 From: xlauko Date: Wed, 28 May 2025 21:15:58 +0200 Subject: [PATCH 1/3] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return OpBuilder::InsertPoint(block, block->begin()); }; - mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx, - clang::CharUnits size) { -// N

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/141830 >From a58132702ff7b996d805172144ae1f261495c624 Mon Sep 17 00:00:00 2001 From: xlauko Date: Wed, 28 May 2025 21:15:58 +0200 Subject: [PATCH 1/2] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#141830** https://app.graphite.dev/github/pr/llvm/llvm-project/141830?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14183

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/141830 - Uses getIIntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit typ

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

2025-05-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/141700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

2025-05-28 Thread Henrich Lauko via cfe-commits
@@ -135,6 +135,10 @@ class CIRGenConsumer : public clang::ASTConsumer { } } } + + void CompleteTentativeDefinition(VarDecl *D) override { +Gen->CompleteTentativeDefinition(D); + } xlauko wrote: ```suggestion void CompleteTentativeDefinition(V

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

2025-05-28 Thread Henrich Lauko via cfe-commits
@@ -1044,6 +1057,24 @@ StringRef CIRGenModule::getMangledName(GlobalDecl gd) { return mangledDeclNames[canonicalGd] = result.first->first(); } +void CIRGenModule::emitTentativeDefinition(const VarDecl *d) { + assert(!d->getInit() && "Cannot emit definite definitions here!")

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

2025-05-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/141700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >