[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-11 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +using u16 = unsigned short; +using u32 = unsigned int; +using u64 = unsigned long long; + +u16 bswap_u16(u16 x) { + retu

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-10 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +int foo(int a, int b) { + int x = a * b; + x *= b; + x /= b; + x %= b; + x += b; + x -= b; + x >>= b; + x <<= b;

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/157333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,9 @@ +// TODO: fix crash in emitTaskWaitCall andykaylor wrote: We don't have any OpenMP support upstream, so this test is only passing because it doesn't really do anything. This should be removed from your PR. https://github.com/llvm/llvm-project/pu

[clang] [Clang][CodeGen]NFC] Modernize loops in EmitCtorPrologue (PR #155668)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/155668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Thanks for working on this! https://github.com/llvm/llvm-project/pull/157333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix build warnings after #154142 (PR #157724)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/157724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +int foo(int a, int b) { + int x = a * b; + x *= b; + x /= b; + x %= b; + x += b; + x -= b; + x >>= b; + x <<= b;

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,264 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-BEFORE,CHECK %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-c

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: true andykaylor wrote: This test isn't doing anything. I'm not sure what the history is, but it doesn't even compile this file. This should also be removed. https://github.com/llvm/llvm-project/pull/157333 _

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +int foo(int a, int b) { + int x = a * b; + x *= b; + x /= b; + x %= b; + x += b; + x -= b; + x >>= b; + x <<= b;

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t.ll andykaylor wrote: This file's name is misspelled. https://github.com/llvm/llvm-project/pull/157333 ___ cfe-commits

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor 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 + +// Yields void. +void test1() { ({ }); } +// CHECK: @test1 +// CHECK-NEXT: cir.return + + +// Yields an out-of-scope scalar. +vo

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good, but it isn't clear to me why the crashes were occurring. I see from the description of #155244 that replaceAllUsesWith now has a delayed effect in some circumstances. Was the fact that we were erasing the replaced op ca

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-07 Thread Andy Kaylor via cfe-commits
@@ -1053,9 +1053,12 @@ mlir::LogicalResult CIRToLLVMBaseClassAddrOpLowering::matchAndRewrite( mlir::LogicalResult CIRToLLVMAllocaOpLowering::matchAndRewrite( cir::AllocaOp op, OpAdaptor adaptor, mlir::ConversionPatternRewriter &rewriter) const { - assert(!cir::Missing

[clang] [Clang][CodeGen]NFC] Modernize loops in EmitCtorPrologue (PR #155668)

2025-09-07 Thread Andy Kaylor via cfe-commits
andykaylor wrote: ping https://github.com/llvm/llvm-project/pull/155668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-07 Thread Andy Kaylor via cfe-commits
@@ -149,6 +149,57 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, emitVAEnd(emitVAListRef(e->getArg(0)).getPointer()); return {}; + case Builtin::BIalloca: + case Builtin::BI_alloca: + case Builtin::BI__builtin_alloca_uninitializ

[clang] [CIR] Fix Complex emit promotion for Div op (PR #156963)

2025-09-07 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/156963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-07 Thread Andy Kaylor via cfe-commits
@@ -149,6 +149,57 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, emitVAEnd(emitVAListRef(e->getArg(0)).getPointer()); return {}; + case Builtin::BIalloca: + case Builtin::BI_alloca: + case Builtin::BI__builtin_alloca_uninitializ

[clang] [CIR] Add support for delegating constructors with VTT args (PR #156970)

2025-09-07 Thread Andy Kaylor via cfe-commits
@@ -70,3 +70,266 @@ DelegatingWithZeroing::DelegatingWithZeroing(int) : DelegatingWithZeroing() {} // OGCG: store i32 %[[I_ARG]], ptr %[[I_ADDR]] // OGCG: %[[THIS:.*]] = load ptr, ptr %[[THIS_ADDR]] // OGCG: call void @llvm.memset.p0.i64(ptr align 4 %[[THIS]], i8 0, i64

[clang] [CIR] Add support for delegating constructors with VTT args (PR #156970)

2025-09-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/156970 >From 6a4aa7928818708adfb0fa1edeaa7db87825e4ad Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 3 Sep 2025 15:47:38 -0700 Subject: [PATCH 1/2] [CIR] Add support for delegating constructors with VTT args

[clang] [CIR] Add support for delegating constructor initialization (PR #156757)

2025-09-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/156757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-06 Thread Andy Kaylor via cfe-commits
@@ -149,6 +149,57 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, emitVAEnd(emitVAListRef(e->getArg(0)).getPointer()); return {}; + case Builtin::BIalloca: + case Builtin::BI_alloca: + case Builtin::BI__builtin_alloca_uninitializ

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-05 Thread Andy Kaylor via cfe-commits
@@ -258,3 +258,13 @@ void trap2() { // LLVM: {{.+}}: // LLVM-NEXT:call void @_Z2f1v() // LLVM: } + +void *test_alloca(unsigned long n) { + return __builtin_alloca(n); +} + +// CIR-LABEL: @_Z11test_allocam( +// CIR: %{{.+}} = cir.alloca !u8i, !cir.ptr, %

[clang] [CIR][NFC] Consildate CIRGenExprCXX.cpp files (PR #157169)

2025-09-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/157169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement CXX field default initialization (PR #157140)

2025-09-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/157140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for delegating constructors with VTT args (PR #156970)

2025-09-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/156970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Consildate CIRGenExprCXX.cpp files (PR #157169)

2025-09-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/157169 Somewhere in the upstreaming process, we created a file CIRGenCXXExpr.cpp that corresponded to the file CIRGenExprCXX.cpp in the incubator. Later we created a CIRGenExprCXX.cpp file. This change consolidate

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-05 Thread Andy Kaylor via cfe-commits
@@ -149,6 +149,57 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, emitVAEnd(emitVAListRef(e->getArg(0)).getPointer()); return {}; + case Builtin::BIalloca: + case Builtin::BI_alloca: + case Builtin::BI__builtin_alloca_uninitializ

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-05 Thread Andy Kaylor via cfe-commits
@@ -258,3 +258,13 @@ void trap2() { // LLVM: {{.+}}: // LLVM-NEXT:call void @_Z2f1v() // LLVM: } + +void *test_alloca(unsigned long n) { + return __builtin_alloca(n); andykaylor wrote: Can you add a test with two of these? https://github.com/

[clang] [CIR] Implement CXX field default initialization (PR #157140)

2025-09-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/157140 This adds the code needed to handle default initialization for fields of various types. >From 900db2b7f4a3baf8fb1e86f891466a95ecc7ac52 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Thu, 4 Sep 2025 15:26:

[clang] [CIR] Fix Complex emit promotion for Div op (PR #156963)

2025-09-04 Thread Andy Kaylor via cfe-commits
@@ -749,6 +749,7 @@ mlir::Value ComplexExprEmitter::emitPromoted(const Expr *e, HANDLE_BINOP(Add) HANDLE_BINOP(Sub) HANDLE_BINOP(Mul) + HANDLE_BINOP(Div) andykaylor wrote: I don't understand what this is doing. The test you added compile

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-09-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/156521 >From 256f055c5d6982bab9b51223d00c9910ff7a6e5c Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 19 Aug 2025 13:33:27 -0700 Subject: [PATCH 1/2] [CIR] Add support for constructors with VTT parameters Thi

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/155697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/155697 >From 1eab5f0f18485d58934bf87c0f1f3014cb76a995 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 27 Aug 2025 12:00:37 -0700 Subject: [PATCH 1/3] [CIR] Emit copy for aggregate initialization This adds the

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/155697 >From 36b02a82c306c31e8b824e365b0c7a6db34238d2 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 27 Aug 2025 12:00:37 -0700 Subject: [PATCH 1/2] [CIR] Emit copy for aggregate initialization This adds the

[clang] [CIR] Support ComplexType in CallExpr args (PR #156236)

2025-09-03 Thread Andy Kaylor via cfe-commits
@@ -909,3 +909,46 @@ void foo33(__builtin_va_list a) { // OGCG: %[[B_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr %[[B_ADDR]], i32 0, i32 1 // OGCG: store float %[[RESULT_REAL]], ptr %[[B_REAL_PTR]], align 4 // OGCG: store float %[[RESULT_IMAG]], ptr %[[

[clang] [CIR] Add support for emitting VTTs and related ojects (PR #155721)

2025-09-03 Thread Andy Kaylor via cfe-commits
@@ -226,6 +289,109 @@ cir::GlobalLinkageKind CIRGenModule::getVTableLinkage(const CXXRecordDecl *rd) { return cir::GlobalLinkageKind::ExternalLinkage; } +cir::GlobalOp CIRGenVTables::getAddrOfVTT(const CXXRecordDecl *rd) { + assert(rd->getNumVBases() && "Only classes with

[clang] [OpenACC] Reduction 'init' lowering for all-ones/least/largest (PR #156535)

2025-09-03 Thread Andy Kaylor via cfe-commits
@@ -2627,16 +2664,40 @@ static Expr *GenerateReductionInitRecipeExpr(ASTContext &Context, } else { assert(Ty->isScalarType()); -// TODO: OpenACC: This currently only works for '1', but we need to figure -// out a way to do least/largest/all-1s. -if (Ty->isF

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/156085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm with xlauko's comments addressed https://github.com/llvm/llvm-project/pull/156356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Andy Kaylor via cfe-commits
@@ -416,18 +420,26 @@ def CIR_LoadOp : CIR_Op<"load", [ // Load address from memory at address %0. %3 is used by at least one // operation that dereferences a pointer. %3 = cir.load deref %0 : !cir.ptr> + +// Perform a volatile load from address in %0. +%4 =

[clang] [CIR] Upstream Atomic init for ComplexType (PR #156518)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/156521 This adds the support for implicit VTT arguments in constructors. >From 256f055c5d6982bab9b51223d00c9910ff7a6e5c Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 19 Aug 2025 13:33:27 -0700 Subject: [PAT

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/156124 >From 99df40768de131846d6b58ac876cafd6dcddc2c0 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 29 Aug 2025 14:22:41 -0700 Subject: [PATCH 1/2] [CIR] Add handling for volatile loads and stores This fill

[clang] [CIR] Add support for emitting VTTs and related ojects (PR #155721)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/155721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Reorder GenExprComplex and add errors for unhandled visitors (PR #156241)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: lgtm. Thanks for handling this! https://github.com/llvm/llvm-project/pull/156241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-09-02 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -306,7 +316,45 @@ void CIRRecordLowering::fillOutputFields() { RecordDecl::field_iterator CIRRecordLowering::accumulateBitFields(RecordDecl::field_iterator field, RecordDecl::field_iterator fieldEnd) { - assert(!cir::MissingFeatures::i

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/156085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Looks good, with just a couple of test requests. https://github.com/llvm/llvm-project/pull/156085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -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 -mms-bitfields -fclangir -emit-llvm %s -o %t-ci

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2733,14 +2786,33 @@ SemaOpenACC::CreateInitRecipe(OpenACCClauseKind CK, // are used for code generation, we can just ignore/not bother doing any // initialization here. break; - case OpenACCReductionOperator::Multiplication: case OpenACC

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This looks good, but I have some questions and a couple of suggestions. https://github.com/llvm/llvm-project/pull/156122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/156122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/156124 This fills in the missing pieces to handle volatile loads and stores in CIR. This addresses https://github.com/llvm/llvm-project/issues/153280 >From 99df40768de131846d6b58ac876cafd6dcddc2c0 Mon Sep 17 00:00:

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/156092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/156092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Looks good, but without calling convention lowering it's not very useful. https://github.com/llvm/llvm-project/pull/156092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -853,3 +853,56 @@ void foo32() { // OGCG: %[[REAL_ADDR:.*]] = alloca i32, align 4 // OGCG: %[[REAL:.*]] = load i32, ptr @_ZN9Container1cE, align 4 // OGCG: store i32 %[[REAL]], ptr %[[REAL_ADDR]], align 4 + +void foo33(__builtin_va_list a) { + float _Complex b = __builtin_v

[clang] [CIR] Add value initialization for scalar types (PR #156036)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Complex Unary plus and minus with promoted type (PR #155486)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Improve warning message for complex range overrides (PR #154899)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2730,17 +2730,38 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, } } -static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) { - return (Range == LangOptions::ComplexRangeKind::CX_None) - ? "" - : "-fcomple

[clang] [clang][driver] Improve warning message for complex range overrides (PR #154899)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good to me. https://github.com/llvm/llvm-project/pull/154899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Improve warning message for complex range overrides (PR #154899)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/154899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3,9 +3,32 @@ // CHECK: acc.reduction.recipe @reduction_lor__ZTSA5_f : !cir.ptr> reduction_operator init { // CHECK-NEXT: ^bb0(%[[ARG:.*]]: !cir.ptr>{{.*}}) -// CHECK-NEXT: cir.alloca !cir.array, !cir.ptr>, ["openacc.reduction.init"] -// TODO OpenACC: Expecting an initia

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -425,6 +425,7 @@ class OpenACCClauseCIREmitter final &recipe.getCopyRegion(), recipe.getCopyRegion().end(), {mainOp.getType(), mainOp.getType()}, {loc, loc}); builder.setInsertionPointToEnd(&recipe.getCopyRegion().back()); +CIRGenFunction::LexicalScop

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -30,7 +30,8 @@ llvm::Align CIRDataLayout::getAlignment(mlir::Type ty, bool useABIAlign) const { return llvm::Align(1); // Get the layout annotation... which is lazily created on demand. -llvm_unreachable("getAlignment()) for record type is not implemented");

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I have a lot of suggestions for updating the op description, but feel free to merge after updating those. https://github.com/llvm/llvm-project/pull/154994 ___ cfe-commits maili

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/154994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] DivOp & CompoundAssignmentDiv between ComplexType and ScalarType (PR #155167)

2025-08-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

  1   2   3   4   5   6   7   8   9   10   >