@@ -22,15 +24,97 @@ struct LoweringPreparePass : public
LoweringPrepareBase {
void runOnOperation() override;
void runOnOp(Operation *op);
+ void lowerArrayCtor(ArrayCtor op);
};
} // namespace
-void LoweringPreparePass::runOnOp(Operation *op) {}
+void LoweringPrep
@@ -2219,6 +2219,50 @@ def CIR_TrapOp : CIR_Op<"trap", [Terminator]> {
let assemblyFormat = "attr-dict";
}
+//===--===//
+// ArrayCtor
+//===--
@@ -805,4 +805,50 @@ bool CIRGenFunction::shouldNullCheckClassCastValue(const
CastExpr *ce) {
return true;
}
+/// Computes the length of an array in elements, as well as the base
+/// element type and a properly-typed first element pointer.
+mlir::Value
+CIRGenFunction::emi
@@ -2219,6 +2219,50 @@ def CIR_TrapOp : CIR_Op<"trap", [Terminator]> {
let assemblyFormat = "attr-dict";
}
+//===--===//
+// ArrayCtor
+//===--
https://github.com/bcardosolopes approved this pull request.
LGTM after existing comments are addressed, nothing else to add on my part.
https://github.com/llvm/llvm-project/pull/148999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
@@ -1053,6 +1053,68 @@ LValue CIRGenFunction::emitMemberExpr(const MemberExpr
*e) {
llvm_unreachable("Unhandled member declaration!");
}
+/// Evaluate an expression into a given memory location.
+void CIRGenFunction::emitAnyExprToMem(const Expr *e, Address location,
+
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/148962
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -515,5 +515,35 @@ def BitfieldInfoAttr : CIR_Attr<"BitfieldInfo",
"bitfield_info"> {
];
}
+//===--===//
+// AddressPointAttr
+//===--==
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/148704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
let dependentDialects = ["cir::CIRDialect"];
}
+def LoweringPrepare : Pass<"cir-lowering-prepare"> {
+ let summary = "Preparation work before lowering to LLVM dialect";
+ let description = [{
+This pass d
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
let dependentDialects = ["cir::CIRDialect"];
}
+def LoweringPrepare : Pass<"cir-lowering-prepare"> {
+ let summary = "Preparation work before lowering to LLVM dialect";
bcardosolopes wrote:
`
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/148545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
We need to update some of the entries because they are old now, so a few
comments on that, otherwise LGTM
https://github.com/llvm/llvm-project/pull/148545
___
cfe-commits mailing list
cfe-co
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
https://github.com/bcardosolopes commented:
Added more reviewers and some nits
https://github.com/llvm/llvm-project/pull/146815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/146815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
https://github.com/bcardosolopes approved this pull request.
Nice, tks!
https://github.com/llvm/llvm-project/pull/147628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1669,6 +1669,90 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
@@ -1669,6 +1669,90 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
@@ -2384,6 +2385,82 @@ mlir::LogicalResult
CIRToLLVMComplexImagOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMSetBitfieldOpLowering::matchAndRewrite(
+cir::SetBitfieldOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &r
@@ -2066,6 +2066,11 @@ LogicalResult cir::ComplexRealOp::verify() {
}
OpFoldResult cir::ComplexRealOp::fold(FoldAdaptor adaptor) {
+ if (auto complexCreateOp = dyn_cast_or_null(
+ getOperand().getDefiningOp())) {
+return complexCreateOp.getOperand(0);
+ }
--
bcardosolopes wrote:
> if transformations like this should be implemented in cir-simplify
For this specific one I agree with @xlauko, it could have already come out of
CIRGen like this without any hurting source fidelity. For anything slightly
more cir-simplify should be used. We just went thr
@@ -2521,6 +2521,32 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> {
let hasFolder = 1;
}
+//===--===//
+// ComplexAddOp
+//===--===
@@ -2521,6 +2521,32 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> {
let hasFolder = 1;
}
+//===--===//
+// ComplexAddOp
+//===--===
https://github.com/bcardosolopes closed
https://github.com/llvm/llvm-project/pull/147365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM pending my last comment
https://github.com/llvm/llvm-project/pull/147209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -82,12 +85,17 @@ llvm::LogicalResult
prepareCIRModuleDataLayout(mlir::ModuleOp mod,
// Data layout is fully determined by the target triple. Here we only pass
the
// triple to get the data layout.
+ llvm::IntrusiveRefCntPtr diagID(
+ new clang::DiagnosticIDs);
+
@@ -82,12 +85,17 @@ llvm::LogicalResult
prepareCIRModuleDataLayout(mlir::ModuleOp mod,
// Data layout is fully determined by the target triple. Here we only pass
the
// triple to get the data layout.
+ llvm::IntrusiveRefCntPtr diagID(
+ new clang::DiagnosticIDs);
+
https://github.com/bcardosolopes approved this pull request.
LGTM
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
@@ -1204,7 +1204,41 @@ class CIRGenFunction : public CIRGenTypeCache {
void updateLoopOpParallelism(mlir::acc::LoopOp &op, bool isOrphan,
OpenACCDirectiveKind dk);
+ // The OpenACC 'cache' construct actually applies to the 'loop' if present.
https://github.com/bcardosolopes approved this pull request.
Overall looks good, one question and one nit!
https://github.com/llvm/llvm-project/pull/146915
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/146915
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> This did require some work to ensure that the cache doesn't have 'vars' that
> aren't inside of the loop, but Sema is taking care of that with a warning
Because it's a warning, is there anything we can add to existing verifiers to
sanity check the invariant?
https://git
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/145178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -662,13 +665,17 @@ static void printCallCommon(mlir::Operation *op,
}
printer << "(" << ops << ")";
+ if (isNothrow)
+printer << " nothrow";
bcardosolopes wrote:
Fair, this should go away if we end up using a tablegen based printer/parser at
some
https://github.com/bcardosolopes commented:
Thanks for updating the other attributes names as well, way to go.
https://github.com/llvm/llvm-project/pull/145178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
@@ -77,17 +77,38 @@ void CIRGenFunction::emitAggregateStore(mlir::Value value,
Address dest) {
builder.createStore(*currSrcLoc, value, dest);
}
+static void addAttributesFromFunctionProtoType(CIRGenBuilderTy &builder,
+ mlir::Na
@@ -662,13 +665,17 @@ static void printCallCommon(mlir::Operation *op,
}
printer << "(" << ops << ")";
+ if (isNothrow)
+printer << " nothrow";
bcardosolopes wrote:
and here!
https://github.com/llvm/llvm-project/pull/145178
_
@@ -611,6 +611,9 @@ static mlir::ParseResult parseCallCommon(mlir::OpAsmParser
&parser,
if (parser.parseRParen())
return mlir::failure();
+ if (parser.parseOptionalKeyword("nothrow").succeeded())
+result.addAttribute("nothrow", mlir::UnitAttr::get(parser.getContext
https://github.com/bcardosolopes commented:
Thanks for the changes, more comments!
https://github.com/llvm/llvm-project/pull/145178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/145178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/145178
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -227,26 +227,24 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
//======//
cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee,
- mlir::Type returnTyp
@@ -95,6 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
// TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
const unsigned sizeTypeSize =
astContext.getTypeSize(astContext.getSignedSizeType());
+ SizeSizeInBytes = astContext.toCha
@@ -95,6 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
// TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
const unsigned sizeTypeSize =
astContext.getTypeSize(astContext.getSignedSizeType());
+ SizeSizeInBytes = astContext.toCha
https://github.com/bcardosolopes approved this pull request.
LGTM, one minor comment
https://github.com/llvm/llvm-project/pull/145802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/145802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/145792
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM one minor comment
https://github.com/llvm/llvm-project/pull/145792
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1772,7 +1772,8 @@ def FuncOp : CIR_Op<"func", [
OptionalAttr:$sym_visibility,
UnitAttr:$comdat,
OptionalAttr:$arg_attrs,
- OptionalAttr:$res_attrs);
+ OptionalAt
@@ -368,4 +368,34 @@ def CIR_VisibilityAttr : CIR_Attr<"Visibility",
"visibility"> {
}];
}
+//===--===//
+// ExtraFuncAttributesAttr
+//===---
https://github.com/bcardosolopes closed
https://github.com/llvm/llvm-project/pull/145096
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/145551
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes closed
https://github.com/llvm/llvm-project/pull/144726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM w one extra minor suggestion
https://github.com/llvm/llvm-project/pull/144726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/bcardosolopes approved this pull request.
Nice to see this done Incrementally, LGTM.
https://github.com/llvm/llvm-project/pull/145067
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/145163
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -989,6 +989,19 @@ mlir::LogicalResult
CIRToLLVMConstantOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMExpectOpLowering::matchAndRewrite(
+cir::ExpectOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) const
https://github.com/bcardosolopes approved this pull request.
Pretty straightforward, thanks! Do you mind backporting this to the incubator
when you get the chance?
https://github.com/llvm/llvm-project/pull/145058
___
cfe-commits mailing list
cfe-commi
https://github.com/bcardosolopes approved this pull request.
Thanks for all these cleanups, great!
https://github.com/llvm/llvm-project/pull/144999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/bcardosolopes approved this pull request.
Awesome!
https://github.com/llvm/llvm-project/pull/144950
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/144877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/144726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/144262
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/144261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid(
return true;
}
+static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf,
+CXXCtorInitializer *memberInit,
+
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/144583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM module few nits
https://github.com/llvm/llvm-project/pull/144583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid(
return true;
}
+static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf,
+CXXCtorInitializer *memberInit,
+
@@ -84,6 +200,34 @@ Address CIRGenFunction::loadCXXThisAddress() {
return Address(loadCXXThis(), cxxThisAlignment);
}
+void CIRGenFunction::emitInitializerForField(FieldDecl *field, LValue lhs,
+ Expr *init) {
+ QualType fieldType
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid(
return true;
}
+static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf,
+CXXCtorInitializer *memberInit,
+
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/144583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/143771
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM once all existing comments are addressed.
https://github.com/llvm/llvm-project/pull/142041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
// CallOp
//===--===//
+def SE_All : I32EnumAttrCase<"All", 1, "all">;
+def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">;
+def SE_Const : I32EnumAttrCase<"
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/144384
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
Nice, LGTM
https://github.com/llvm/llvm-project/pull/144376
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> I have concerns about the CIR representation here. I think we should be
> aligning our representation of complex operations with the MLIR complex
> dialect ... We'll still need to go to the memory representation when it gets
> lowered to LLVM IR, but I would like to keep
https://github.com/bcardosolopes approved this pull request.
I don't have anything else to add besides current reviews, LGTM once it's
updated to incorporate the other landed change.
https://github.com/llvm/llvm-project/pull/144225
___
cfe-commits mai
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/144201
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
// CallOp
//===--===//
+def SE_All : I32EnumAttrCase<"All", 1, "all">;
+def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">;
+def SE_Const : I32EnumAttrCase<"
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/144165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/144138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM, one nit
https://github.com/llvm/llvm-project/pull/143984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/143984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu
-Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu
-Wno-unused-value -fcla
@@ -142,7 +142,8 @@ void CIRCanonicalizePass::runOnOperation() {
// Many operations are here to perform a manual `fold` in
// applyOpPatternsGreedily.
if (isa(op))
+VecExtractOp, VecShuffleOp, VecShuffleDynamicOp, VecSplatOp,
+VecTernaryOp>(o
bcardosolopes wrote:
> To be clear, this is a matter of idealism. There's no doubt that I can write
> code to handle both types, and all the information I want is available. A
> program processing CIR probably won't have a problem with this. It's more of
> an issue for a person reading the CIR
@@ -274,6 +274,12 @@ class AggValueSlot {
public:
enum IsZeroed_t { IsNotZeroed, IsZeroed };
+ /// ignored - Returns an aggregate value slot indicating that the aggregate
bcardosolopes wrote:
"ignored - " not necessary
https://github.com/llvm/llvm-project
https://github.com/bcardosolopes approved this pull request.
LGTM, some nits
https://github.com/llvm/llvm-project/pull/143377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/143377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1533,6 +1533,17 @@ LogicalResult cir::GetMemberOp::verify() {
// VecCreateOp
//===--===//
+OpFoldResult cir::VecCreateOp::fold(FoldAdaptor adaptor) {
+ auto elements = getElements();
+ if (std::any_of(e
@@ -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
@@ -77,12 +77,8 @@ void foo() {
// CIR: %[[VEC_F:.*]] = cir.alloca !cir.vector<4 x !s32i>,
!cir.ptr>, ["f", init]
// CIR: %[[VEC_G:.*]] = cir.alloca !cir.vector<4 x !s32i>,
!cir.ptr>, ["g", init]
// CIR: %[[VEC_H:.*]] = cir.alloca !cir.vector<4 x !s32i>,
!cir.ptr>, ["h", ini
@@ -1580,9 +1580,46 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor
adaptor) {
}
//===--===//
-// VecShuffle
+// VecShuffleOp
//===--
@@ -1599,6 +1599,14 @@ LogicalResult cir::VecShuffleOp::verify() {
<< " and " << getResult().getType() << " don't match";
}
+ const uint64_t maxValidIndex =
+ getVec1().getType().getSize() + getVec2().getType().getSize() - 1;
+ for (const auto
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/143322
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 980 matches
Mail list logo