[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2649520 , @LuoYuanke wrote: > In D99152#2647681 , @fhahn wrote: > >> I can't see any `load <256 x i32>` in the linked example, just a store. >> Could you check the example? > > I cr

[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2655304 , @lebedev.ri wrote: > In D99152#2655274 , @fhahn wrote: > >> In D99152#2649520 , @LuoYuanke >> wrote: >> >>> In D99152#2647681

[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2655371 , @lebedev.ri wrote: > In D99152#2655357 , @fhahn wrote: > >> snip >> I'm not sure if the loads and store are actually incorrect. `_tile1024i ` is >> defined as `typedef

[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2655691 , @LuoYuanke wrote: >> I think that point was not really clear during the discussion. Using `load >> <256 x i32>` to lower `__tile_loadd() ` would indeed be incorrect. But I >> don't think that's happening at the

[PATCH] D99506: [OpenMP][NFC] Move the `noinline` to the parallel entry point

2021-03-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Is it possible to add a test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99506/new/ https://reviews.llvm.org/D99506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2655880 , @LuoYuanke wrote: >> Whether to further optimizations are correct is a different problem, but we >> need a specification for the builtins, intrinsics and the type before going >> any further in that direction. >

[PATCH] D99433: [Matrix] Including __builtin_matrix_multiply_add for the matrix type extension.

2021-03-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99433#2661357 , @everton.constantino wrote: > @fhahn When I mentioned the splats I was talking about the IR, not the final > code. On the Godbolts links you sent, its the same that I see. However take a > look into the IR your

[PATCH] D99433: [Matrix] Including __builtin_matrix_multiply_add for the matrix type extension.

2021-03-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99433#2661919 , @everton.constantino wrote: > @fhahn Ok I see what you mean now, this sounds like a doable path and might > be able to cover architectures with specialized matrix multiplication > instructions as well . > > Jus

[PATCH] D99152: [AMX] Prototype for vector and amx bitcast.

2021-03-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99152#2661296 , @LuoYuanke wrote: >> Unfortunately this is not possible to use an opaque type with the AMX >> intrinsics at the moment, because of the way they are define. It is possible >> to use opaque types with intrinsics i

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-03-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2659477 , @SaurabhJha wrote: >> What code do you want to get out of this? Are there e.g. vectorized >> float->double conversions we can use, or is the operation basically doomed >> to break the matrix apart and put it ba

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2665030 , @SaurabhJha wrote: > Hey, elementary question about arcanist. I followed the steps here > https://llvm.org/docs/Contributing.html#how-to-submit-a-patch and did > > arc diff --edit --verbatim > > on my current b

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2665082 , @SaurabhJha wrote: > Hi Florian and John, > > Thanks for the comments so far. I figure it would be easier for further > discussion if I have something concrete. Here's what I have right now: > > - A new CK_Matrix

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:547 + case CK_MatrixCast: { +// TODO: Handle MatrixCast here. + } SaurabhJha wrote: > I thought doing changes here is is outside the scope of casting so I jus

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:2916 // Require the operand to be a scalar or vector. + if (!SrcType->isScalarType() && !SrcType->isVectorType() && ` ... or a matrix`? Comment at: clang/test/Sema/matri

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7400 + } else { +return Diag(R.getBegin(), +diag::err_invalid_conversion_between_matrix_and_scalar) When we get here, `SrcTy` may not necessarily be a scalar I think (see my

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2666230 , @SaurabhJha wrote: > Update commit message to more accurately reflect the patch Just FYI, `arc diff ` does not update the patch description on Phabricator. I think you have to edit it via the web-interface. Re

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-04-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/test/CodeGen/matrix-cast.c:15 + // CHECK: [[C:%.*]] = load <25 x i8>, <25 x i8>* {{.*}}, align 1 + // CHECK-NEXT: [[CONV:%.*]] = zext <25 x i8> [[C]] to <25 x i32> + // CHECK-NEXT: store <25 x i32> [[CONV]], <25 x i32>* {{

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2667484 , @SaurabhJha wrote: > Addressed most of the comments. I couldn't understand "..would also be good > to have C++ tests that test casting with matrix types where some of the > dimensions are template arguments...".

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1324 + +if (SrcElementTy->isFloatTy() || SrcElementTy->isDoubleTy()) { + QualType DstElementType = DstType->castAs()->getElementType(); I think we should support all floating po

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1324 + +if (SrcElementTy->isFloatTy() || SrcElementTy->isDoubleTy()) { + QualType DstElementType = DstType->castAs()->getElementType(); SaurabhJha wrote: > fhahn wrote: > > I th

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2673367 , @SaurabhJha wrote: > Hey Florian and John, > > Thanks for your reviews so far. Just checked the build. Addressed all > previous comments and the build is looking good too except for one thing. For > open cl test

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:796 + bool EmitBoolCondBranch = !C || !C->isOne(); + bool CondIsConst = C; const SourceRange &R = S.getSourceRange(); lebedev.ri wrote: > I think, if we really want to give this a name, pe

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 335786. fhahn added a comment. rebased after pre-committing additional RUN lines in 7ca4dd82175c . Also adjusts a variable name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D100051: [clang] Move int <-> float scalar conversion to a separate function

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added reviewers: rsmith, erichkeane. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1209 +if (isa(DstTy)) + Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv"); +else if (InputSigned) now that' this is a se

[PATCH] D100051: [clang] Move int <-> float scalar conversion to a separate function

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D100051#2674849 , @erichkeane wrote: > Alright, validating it now, then I'll push. Thanks Erich! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100051/new/ https://reviews.llvm.o

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1219 + } else { +SrcElementTy = SrcTy; +DstElementTy = DstTy; We should be able to assert here that both types are not matrix types, I think? Comment at: clang

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Thanks for the latest update! This basically looks good to me, with a few final nits! Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8584 +def err_invalid_conversion_between_matrixes : Error< + "conversion between matrix type%diff{ $ and $

[PATCH] D99501: ignore -flto= options recognized by GCC

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99501#2668774 , @lebedev.ri wrote: > Tests missing. > This somehow wasn't sent to cfe-commits list @doko could you add a test? e.g. in `clang/test/Driver/clang_f_opts.c`, which already contains a check for `-ffat-lto-objects`

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 336058. fhahn added a comment. Change names of loopMustProgress to checkIfLoopMustProgress. Same for functionMustProgress. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96418/new/ https://reviews.llvm.org/D96418

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:801 + SourceLocToDebugLoc(R.getEnd()), + loopMustProgress(CondIsConst)); lebedev.ri wrote: > fhahn wrote: > > lebedev.ri wrote: > > > Now this doesn't make sen

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! Comment at: clang/include/clang/Sema/Sema.h:11715 + // CheckMatrixCast - Check type constraints for matrix casts. + // We allow casting betw

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99037#2678848 , @SaurabhJha wrote: > In D99037#2678779 , @fhahn wrote: > >> > > Will create a new patch to address your last comments Can you directly update this one? I'll commit it aft

[PATCH] D99501: ignore -flto= options recognized by GCC

2021-04-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99501#2679394 , @doko wrote: > here in the same place, or in a different merge request? This one is closed now I think, so a new review would be ideal. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-10 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71ab6c98a0d1: [Matrix] Implement C-style explicit type conversions for matrix types. (authored by SaurabhJha, committed by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D100484: add test case for ignoring -flto=auto and -flto=jobserver

2021-04-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100484/new/ https://reviews.llvm.org/D100484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D99501: ignore -flto= options recognized by GCC

2021-04-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99501#2689090 , @tejohnson wrote: > Just approved the test case patch. Sorry I missed the lack of test on this! Great, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99501/

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D96418#2676338 , @lebedev.ri wrote: > Seems fine to me. > Might be good for someone else (@aaron.ballman ?) to also take a look, not > sure. ping. @aaron.ballman any chance you could take another quick look? Repository: rG L

[PATCH] D99433: [Matrix] Including __builtin_matrix_multiply_add for the matrix type extension.

2021-04-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn requested changes to this revision. fhahn added a comment. This revision now requires changes to proceed. In D99433#2662275 , @everton.constantino wrote: > Great, Ill update the patch then. Thanks for the comments! Sounds good to me, thanks! Markin

[PATCH] D100834: Bug 49739 - [Matrix] Support #pragma clang fp

2021-04-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a reviewer: mibintc. fhahn added a subscriber: mibintc. fhahn added a comment. Awesome, thanks for the patch! I'm also adding @mibintc who I think was working on adding support for the pragma & co. Could you add a brief description to the patch and also reference the bug report on

[PATCH] D100834: Bug 49739 - [Matrix] Support #pragma clang fp

2021-04-21 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D100834#2702550 , @kpn wrote: > I don't know the matrix implementation so I can't swear this hits every place > needed, but the uses of CGFPOptionsRAII in this patch look correct at least. Other parts of the extension include `

[PATCH] D100834: Bug 49739 - [Matrix] Support #pragma clang fp

2021-04-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM, thanks! I'll commit the patch shortly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100834/new/ https://reviews.llvm.org/D100834 ___ cfe-commi

[PATCH] D100834: Bug 49739 - [Matrix] Support #pragma clang fp

2021-04-22 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe2277fbf233: [Matrix] Support #pragma clang fp (authored by effective-light, committed by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100834/new/

[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

2020-12-28 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang/test/Misc/loop-opt-setup.c:26 // Check br i1 to make sure the loop is gone, there will still be a label branch for the infinite loop. // CH

[PATCH] D93952: [Clang][Misc] Fix fragile test

2020-12-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D93952#2475526 , @atmnpatel wrote: > I can't say that I know with any certainty, I'm too inexperienced. This > failure was missed by me locally, the pre-merge bot, and by most of the > buildbots other than the ones I mentioned a

[PATCH] D72281: [Matrix] Add matrix type to Clang.

2021-01-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7855 + return; +RowsExpr = Columns.get(); + } else { RKSimon wrote: > @fhahn Should this be ColsExpr? > ``` > ColsExpr = Columns.get(); > ``` > Noticed when looking at > https://llvm.

[PATCH] D93014: [Clang] Add AArch64 VCMLA LANE variants.

2021-01-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 314389. fhahn added a comment. Add comment to tblgen change, remove trailing whitespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93014/new/ https://reviews.llvm.org/D93014 Files: clang/include/clang/Basi

[PATCH] D93014: [Clang] Add AArch64 VCMLA LANE variants.

2021-01-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 314452. fhahn added a comment. Add tests for rotated lane variants. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93014/new/ https://reviews.llvm.org/D93014 Files: clang/include/clang/Basic/arm_neon.td clang

[PATCH] D93014: [Clang] Add AArch64 VCMLA LANE variants.

2021-01-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/Basic/arm_neon.td:1911 +// vcmlaq{ROT}_lane +def : SOpInst<"vcmla" # ROT # "_lane", "...qI", "Q" # type, Op<(call "vcmla" # ROT, $p0, $p1, + (bitcast $p0, (dup_typed laneqty , (call "vget_lane", (bitc

[PATCH] D93483: Add element-type to the Vector TypeLoc types.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/AST/TypeLoc.h:1756 + +class VectorTypeLoc : public ConcreteTypeLoc { Can we reuse/unify this with `MatrixTypeLoc`? And then have `MatrixTypeLoc` just deal with the row/column operands. CHANGES SINCE

[PATCH] D93014: [Clang] Add AArch64 VCMLA LANE variants.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG51d5991f04dd: [Clang] Add AArch64 VCMLA LANE variants. (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D93014?vs=314452&id=314620#toc Repository: rG LLVM Github Monorepo CHANG

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: aaron.ballman, rjmccall, Bigcheese, erichkeane. fhahn requested review of this revision. Herald added a project: clang. The MatrixType, ExtVectorType and VectorSize attributes have arguments defined as ExprArguments in Attr.td. So their arguments

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 314632. fhahn added a comment. Also remove Attr.isArgIdent check from AddressSpaceTypeAttribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94092/new/ https://reviews.llvm.org/D94092 Files: clang/lib/Sema/Se

[PATCH] D72281: [Matrix] Add matrix type to Clang.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7855 + return; +RowsExpr = Columns.get(); + } else { fhahn wrote: > RKSimon wrote: > > @fhahn Should this be ColsExpr? > > ``` > > ColsExpr = Columns.get(); > > ``` > > Noticed when lo

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 314635. fhahn added a comment. In D94092#2479684 , @erichkeane wrote: > I'm not sure how well Attr.td's constraints are enforced on type attributes, > as these often happen before parsing is completely done. I'd imag

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Comment at: clang/lib/Sema/SemaType.cpp:7661 - Expr *SizeExpr; - // Special case where the argument is a template id. - if (Attr.isArgIdent(0)) { -CXXScopeSpec SS; -SourceLocation TemplateKWLoc; -UnqualifiedId Id; -Id.setIdentifier(A

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D94092#2479753 , @erichkeane wrote: >> I tried a few different things to construct matrix_type attributes with >> ArgIdents, but failed. The patch also adjusts the code for a bunch of >> attributes. So if there are indeed cases

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 314640. fhahn added a comment. Address Simon's comments, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94092/new/ https://reviews.llvm.org/D94092 Files: clang/lib/Sema/SemaType.cpp Index: clang/lib/Se

[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

2021-01-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Now that the test is fixed, this could be re-landed, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86844/new/ https://reviews.llvm.org/D86844 ___ cfe-commits mailing list cf

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D94092#2482035 , @erichkeane wrote: > In D94092#2481857 , @aaron.ballman > wrote: > >> In D94092#2481276 , @rjmccall wrote: >> >>> Without botherin

[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

2021-01-06 Thread Florian Hahn via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7ef9139a391a: [Clang] Remove unnecessary Attr.isArgIdent checks. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D93483: Add element-type to the Vector TypeLoc types.

2021-01-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks Comment at: clang/include/clang/AST/TypeLoc.h:1756 + +class VectorTypeLoc : public ConcreteTypeLoc { erichkeane wrote: > fhahn wrote: > > Can we r

[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

2021-01-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D86844#2481922 , @xbolva00 wrote: > int a, b; > > int f(void) { > while (1) { > if (a != b) return 1; > } > return 0; > } > > int g(int a, int b) { > while (1) { > if (a !=

[PATCH] D86841: [clang] Add mustprogress and llvm.loop.mustprogress attribute deduction

2021-01-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added subscribers: xbolva00, fhahn. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:799 EmitBoolCondBranch = false; + FnIsMustProgress = false; +} Shouldn't this only apply for C? http://eel.is/c++draft/intro.progress#1

[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

2021-01-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D86844#2484639 , @atmnpatel wrote: > I might be misunderstanding the standard here but since 1 is a non-zero > constant expression, it can't be assumed to terminate by the implementation > right? The relevant section from C11 at

[PATCH] D94083: [AArch64] Add +pauth archictecture option, allowing the v8.3a pointer authentication extension.

2021-01-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. FWIW I think it would be good to have a bit more details in the description for changes such as this, like a link to the public docs for the extension. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94083/new/ https://reviews

[PATCH] D86841: [clang] Add mustprogress and llvm.loop.mustprogress attribute deduction

2021-01-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D86841#2484705 , @atmnpatel wrote: > I'm happy to add a patch amending this, the reason it wasn't done that way > was because at the time and even now, out of icc/clang/msvc/gcc, gcc seems to > be the only one that happily remov

[PATCH] D94367: [Clang][Driver] Add -ffinite-loops flags

2021-01-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added reviewers: rjmccall, aaron.ballman, erichkeane. fhahn added a comment. Thanks for putting up the patch! I think the code here and D94366 could be simplified if we would introduce 2 codegen options to distinguish the differences between C and C++:

[PATCH] D94779: [Clang] Ensure vector predication pragma is ignored only when vectorization width is 1.

2021-01-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. > This ensures that the Clang loop pragma vectorize_predicate([enable|disable]) > is ignored > when vectorize_width(1) is also used, since that effectively disables > vectorization. Could you elaborate *why* it `vectorize_predicate` should be ignored when `vectorize_widt

[PATCH] D89699: [ExtVector] Make .even/.odd/.lo/.hi return vectors for single elements.

2021-01-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn abandoned this revision. fhahn added a comment. This unfortunately breaks a bunch of existing projects. I'll abandon the change for now, as the gains are probably not worth the cost of breaking backwards compatibility. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D111529: Specify Clang vector builtins.

2021-10-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: scanon, erichkeane, rjmccall, aaron.ballman, dexonsmith, rsmith, craig.topper. fhahn requested review of this revision. Herald added a project: clang. This patch specifies a set of vector builtins for Clang, as discussed on cfe-dev: https://list

[PATCH] D111529: Specify Clang vector builtins.

2021-10-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 378992. fhahn added a comment. Try to be more precise about how the reduction steps are performed and replace _round and _rint by roundeven. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111529/new/ https://revi

[PATCH] D111529: Specify Clang vector builtins.

2021-10-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 4 inline comments as done. fhahn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:538 + T __builtin_elementwise_rint(T x) return the integral value nearest to x (according to the floating point types +

[PATCH] D111529: Specify Clang vector builtins.

2021-10-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 379517. fhahn marked 2 inline comments as done. fhahn added a comment. Another stab at phrasing the reduction step. Also added a note that the implementation is work-in-progress. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D111529: Specify Clang vector builtins.

2021-10-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:552 +operation(x, y) as pairwise tree reduction to the input. The pairs are formed +by concatenating both inputs and pairing adjacent elements. + cr

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: aaron.ballman, scanon, craig.topper, rjmccall, erichkeane. fhahn requested review of this revision. Herald added a project: clang. This patch implements __builtin_elementwise_max and __builtin_elementwise_min, as specified in D111529

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: aaron.ballman, scanon, craig.topper, rjmccall, erichkeane. Herald added a subscriber: mstorsjo. fhahn requested review of this revision. Herald added a project: clang. This patch implements __builtin_elementwise_abs as specified in D111529

[PATCH] D111529: Specify Clang vector builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380351. fhahn marked an inline comment as done. fhahn added a comment. Thanks for the latest set of comments! I tried to incorporate the suggestions about improving the reduction wording. I also added an example. I also put up 2 patches to start with the impl

[PATCH] D111529: Specify Clang vector builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380352. fhahn marked an inline comment as done. fhahn added a comment. adjust padding wording. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111529/new/ https://reviews.llvm.org/D111529 Files: clang/docs/Langu

[PATCH] D111529: Specify Clang vector builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:553 +Each builtin returns a scalar equivalent to applying the specified +operation(x, y) as horizontal recursive pairwise reduction to all vector +elements. In each

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380409. fhahn added a comment. polish tests a bit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111985/new/ https://reviews.llvm.org/D111985 Files: clang/include/clang/Basic/Builtins.def clang/include/clang/

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380411. fhahn added a comment. polish tests a bit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org/D111986 Files: clang/include/clang/Basic/Builtins.def clang/include/clang/

[PATCH] D112001: [Clang] Add min/max reduction builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: aaron.ballman, scanon, craig.topper, rjmccall, erichkeane. fhahn requested review of this revision. Herald added a project: clang. This patch implements __builtin_reduce_max and __builtin_reduce_min as specified in D111529

[PATCH] D112001: [Clang] Add min/max reduction builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380486. fhahn added a comment. Remove stray `!TyA->getAs()` check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112001/new/ https://reviews.llvm.org/D112001 Files: clang/include/clang/Basic/Builtins.def cla

[PATCH] D112001: [Clang] Add min/max reduction builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16673 + if (!VecTy) + if (!TyA->getAs()) + return Diag(A->getBeginLoc(), diag::err_elementwise_math_invalid_arg_type_2) craig.topper wrote: >

[PATCH] D111529: Specify Clang vector builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380500. fhahn marked an inline comment as done. fhahn added a comment. Fix wording: widening -> widened, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111529/new/ https://reviews.llvm.org/D111529 Files:

[PATCH] D111529: Specify Clang vector builtins.

2021-10-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:557 +``i in [0, Number of elements / 2)``. If the numbers of elements is not a +power of 2, the vector is widening with neutral elements for the reduction +at the en

[PATCH] D111529: Specify Clang vector builtins.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380598. fhahn marked an inline comment as done. fhahn added a comment. Thanks @kito-cheng, the example should use `__builtin_reduce_add` instead of `_fadd`! Fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111

[PATCH] D111529: Specify Clang vector builtins.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:579 + NaNs, fmax() return a NaN. + ET __builtin_reduce_add(VT a) \+

[PATCH] D111529: Specify Clang vector builtins.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380612. fhahn marked an inline comment as done. fhahn added a comment. Following feedback from D111986 , explicitly spell out abs behavior of most negative integer as undefined. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380618. fhahn added a comment. Pass is_int_min_poison=true to llvm.abs.* to reflect latest update to the specification to make taking abs of the most negative integer undefined. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3109 + Result = Builder.CreateBinaryIntrinsic( + llvm::Intrinsic::abs, Op0, Builder.getFalse(), nullptr, "elt.abs"); +else craig.top

[PATCH] D111529: Specify Clang vector builtins.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380755. fhahn added a comment. As @scanon pointed out in D111986 , most simd implementations should handle abs(INT_MIN) consistently by returngin INT_MIN. It's therefore better to avoid defining abs(INT_MIN) as UB, which would

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380756. fhahn added a comment. In D111986#3072946 , @scanon wrote: > What's the rationale for making abs undefined on the minimum value? AFAIK > every actual simd implementation defines the result and they agree (and e

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380946. fhahn added a comment. Move type checking to helper function checkMathBuiltinElementType to be reused in D111986 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111985/ne

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380947. fhahn added a comment. Use checkMathBuiltinElementType helper added in D111985 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org/D1119

[PATCH] D112001: [Clang] Add min/max reduction builtins.

2021-10-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 380948. fhahn marked an inline comment as done. fhahn added a comment. rebase on top of recently updated patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112001/new/ https://reviews.llvm.org/D112001 Files:

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16667 + + if (!TyA->getAs() && !ConstantMatrixType::isValidElementType(TyA)) +return Diag(A->getBeginLoc(), diag::err_elementwise_math_invalid_arg_type)

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111985/new/ https://reviews.llvm.org/D111985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 5 inline comments as done. fhahn added a comment. Thanks for taking a look! Comment at: clang/lib/Sema/SemaChecking.cpp:16659-16660 +// false. +static bool checkMathBuiltinElementType(SourceLocation Loc, QualType Ty, +Sema &S

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 6 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16673-16678 + Expr *A = TheCall->getArg(0); + Expr *B = TheCall->getArg(1); + QualType TyA = A->getType(); + QualType TyB = B->getType(); + + if (TyA != TyB)

<    2   3   4   5   6   7   8   >