================ @@ -1533,6 +1533,16 @@ LogicalResult cir::GetMemberOp::verify() { // VecCreateOp //===----------------------------------------------------------------------===// +OpFoldResult cir::VecCreateOp::fold(FoldAdaptor adaptor) { + if (llvm::any_of(getElements(), [](mlir::Value attr) { + return !mlir::isa<cir::ConstantOp>(attr.getDefiningOp()); + })) + return {}; ---------------- xlauko wrote:
```suggestion if (llvm::any_of(getElements(), [](mlir::Value value) { return !mlir::isa<cir::ConstantOp>(value.getDefiningOp()); })) return {}; ``` 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