[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2022-09-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha abandoned this revision. SaurabhJha added a subscriber: Florian. SaurabhJha added a comment. > @SaurabhJha did you ever get a chance to create a patch? Hey @Florian, sorry I dropped the ball here. I don't think I would be able to spend time on this so abandoning this revision. Repos

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D106005#2904424 , @fhahn wrote: > In D106005#2896080 , @SaurabhJha > wrote: > >> In D106005#2895716 , @fhahn wrote: >> >>> Thank you very m

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-07-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. @fhahn addressed your broadcast comment. Would you prefer that I create the initialisation implementation patch before we get this in? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 360886. SaurabhJha added a comment. Add documentation for matrix broadcast initialization Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106005/new/ https://reviews.llvm.org/D106005 Files: clang/docs/Matri

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D106005#2895716 , @fhahn wrote: > Thank you very much for working on this! Are you planning on implementing the > new specification as well? It would probably be good to land the update to > the spec in close succession to

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 360716. SaurabhJha added a comment. Address second round of comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106005/new/ https://reviews.llvm.org/D106005 Files: clang/docs/MatrixTypes.rst Index: c

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/docs/MatrixTypes.rst:279 +The number of constituent arrays must equal the number rows in the matrix type M and the number of elements +in each constituent array must equal the number of columns in the matrix type. + ---

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-21 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 360524. SaurabhJha added a comment. Updated docs to address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106005/new/ https://reviews.llvm.org/D106005 Files: clang/docs/MatrixTypes.rst Index: c

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-20 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/docs/MatrixTypes.rst:271 +- +An empty value of a matrix type M can be initialised using this syntax: + SaurabhJha wrote: > fhahn wrote: > > is there a reason we need to allow 'empty' initiali

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-20 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/docs/MatrixTypes.rst:271 +- +An empty value of a matrix type M can be initialised using this syntax: + fhahn wrote: > is there a reason we need to allow 'empty' initialisation? What does it m

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-19 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106005/new/ https://reviews.llvm.org/D106005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D106005: [Docs] Define matrix initialisation in MatrixTypes documentation

2021-07-14 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As part of https://bugs.llvm.org/show_bug.cgi?id=46251, this patch adds definition of matrix initialisation. I am not very familiar with this part

[PATCH] D104971: [Matrix] Minor fixes with language extension docs

2021-06-26 Thread Saurabh Jha 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 rGc8f3f46c6983: [Docs] Minor fixes with language extension docs (authored by SaurabhJha). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D104971: [Matrix] Minor fixes with language extension docs

2021-06-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D104971#2842319 , @xgupta wrote: > btw you should use [Docs] or [NFC] tag for this patch. Okay, will follow the linked docs and amend the commit message with [Docs]. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D104971: [Matrix] Minor fixes with language extension docs

2021-06-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. This is a light patch that probably does not require a review and I created a patch anyway. Would it be appropriate to get this into main using `arc land` if this is approved? I saw this https://reviews.llvm.org/D78867 which advises against `arc land` but could not

[PATCH] D104971: [Matrix] Minor fixes with language extension docs

2021-06-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There were some issues in the patch https://reviews.llvm.org/D104198. I also forgot to address one comment. T

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/docs/LanguageExtensions.rst:538 + +.. code-block:: c++ + typedef float m4x4_t __attribute__((matrix_type(4, 4))); xgupta wrote: > oh just an blank line is needed :) Thanks, fixing this now. Repository: rG L

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha closed this revision. SaurabhJha added a comment. This is closed by this commit https://github.com/llvm/llvm-project/commit/cd256c8bcc9723f0ce7a32957f26600c966fa07c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://revie

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D104198#2838665 , @fhahn wrote: > In D104198#2838658 , @SaurabhJha > wrote: > >> Sorry, I committed this without the `Differential Revision: >> https://reviews.llvm.org/D104198` li

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Sorry, I committed this without the `Differential Revision: https://reviews.llvm.org/D104198` line. Is there a way to change the commit message after it is in main? I could not push after `git commit --amend` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Thanks, the build is also passing now so I will land this in a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 ___ cfe-commits

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 354232. SaurabhJha added a comment. Rebase with latest main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/LanguageExtensions.rst Index: cla

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 354231. SaurabhJha added a comment. Address round 2 comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/LanguageExtensions.rst Index: cl

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Somehow the builds are failing even though this patch contains no code changes. Comment at: clang/docs/LanguageExtensions.rst:526 +The matrix type extension also supports operations between a matrix and a scalar. + fhahn wrote: >

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-23 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 353971. SaurabhJha added a comment. Removing mistakenly added files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/LanguageExtensions.rst In

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-23 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 353970. SaurabhJha added a comment. Herald added a project: clang-tools-extra. Did a --amend to rebuild Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: cl

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-17 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 352783. SaurabhJha added a comment. Address comment: replace scalar variables by values Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/Languag

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-15 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 352192. SaurabhJha added a comment. Document matrix scalar division Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/LanguageExtensions.rst In

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-15 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 352191. SaurabhJha added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/LanguageExtensions.rst Index: cla

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-13 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 351728. SaurabhJha added a comment. Forgot to add a colon in code-block header. Fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104198/new/ https://reviews.llvm.org/D104198 Files: clang/docs/Language

[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

2021-06-13 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds examples of compound assignment and type conversions for matrix types. Repository: rG LLV

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-06-05 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D101696#2798713 , @SjoerdMeijer wrote: > Perhaps for bonus points, update the Clang documentation in > https://clang.llvm.org/docs/LanguageExtensions.html#matrix-types with some > examples? Can you please point me to how

[PATCH] D103163: [Matrix] Skip matrix casts checks for class or struct types in C++.

2021-05-27 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha accepted this revision. SaurabhJha added a comment. In D103163#2785578 , @fhahn wrote: > I discussed the problem offline with John and he suggested to handle matrix > casts in TryStaticCast. This allows us the handle both static_cast and > C-

[PATCH] D103163: [Matrix] Skip matrix casts checks for class or struct types in C++.

2021-05-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Thanks, this looks good to me! The existing tests are failing but seems like they are not difficult to fix. Once those are fixed, I will mark this as accepted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103163/new/

[PATCH] D102125: [Matrix] Implement static cast for matrix types

2021-05-16 Thread Saurabh Jha via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGecb235d94014: [Matrix] Implement static cast for matrix types (authored by SaurabhJha). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102125/new/ https://re

[PATCH] D102125: [Matrix] Implement static cast for matrix types

2021-05-14 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. I am planning to commit this on Sunday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102125/new/ https://reviews.llvm.org/D102125 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D102125: [Matrix] Implement static cast for matrix types

2021-05-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D102125#2746764 , @fhahn wrote: > LGTM from the mechanical aspect. Please wait a few days with committing, in > case there are any conceptual issues with supporting matrix casts here. Sure, sounds good. Repository: rG

[PATCH] D102125: [Matrix] Implement static cast for matrix types

2021-05-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. I have commit access so I can get this into main branch after its approved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102125/new/ https://reviews.llvm.org/D102125 ___ cfe-

[PATCH] D102125: [Matrix] Implement static cast for matrix types

2021-05-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements static casts for matrix types. This patch finishes all the work needed for https://bugs

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D101696#2734312 , @fhahn wrote: > LGTM, thanks! > > I can land this on your behalf tomorrow. > > After that I think you could apply for commit access > https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access :)

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 342413. SaurabhJha added a comment. Rebase with main and add new tests for uitofp, unsigned int to int, and int to unsigned int Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101696/new/ https://reviews.llvm

[PATCH] D101754: [Matrix] Remove bitcast when casting between matrices of the same size

2021-05-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D101754#2733273 , @fhahn wrote: > LGTM, thanks! > > I can commit this change on your behalf in a bit Cheers Florian! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101754/new/

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D101696#2732983 , @fhahn wrote: > Thanks for the update! Technically the fix in > `clang/lib/CodeGen/CGExprScalar.cpp` is unrelated to C++ support. It would be > great if you could put up a separate patch, so we can land t

[PATCH] D101754: [Matrix] Remove bitcast when casting between matrices of the same size

2021-05-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In matrix type casts, we were doing bitcast when the matrices had the same size. This was incorrect and this

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. All comments addressed now :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101696/new/ https://reviews.llvm.org/D101696 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 342266. SaurabhJha added a comment. Revert change of sext -> zext Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101696/new/ https://reviews.llvm.org/D101696 Files: clang/lib/CodeGen/CGExprScalar.cpp cla

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/test/CodeGenCXX/matrix-casts.cpp:26 + // CHECK: [[C:%.*]] = load <25 x i8>, <25 x i8>* {{.*}}, align 1 + // CHECK-NEXT: [[CONV:%.*]] = sext <25 x i8> [[C]] to <25 x i32> + // CHECK-NEXT: [[CONV1:%.*]] = bitcast [25 x

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 342262. SaurabhJha added a comment. Remove unnecessary newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101696/new/ https://reviews.llvm.org/D101696 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Thanks for your review @fhahn . I have made some changes in CGExprScalar.cpp to address your comments on IR. I have also added a statement to test assignment to incorrect type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 342261. SaurabhJha added a comment. Updating D101696 : [Matrix] Implement C-style explicit type conversions in CXX for matrix types 1. Remove bitcast when types are of the same size. 2. Make int conversion depend on wheth

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/test/CodeGenCXX/matrix-casts.cpp:26 + // CHECK: [[C:%.*]] = load <25 x i8>, <25 x i8>* {{.*}}, align 1 + // CHECK-NEXT: [[CONV:%.*]] = sext <25 x i8> [[C]] to <25 x i32> + // CHECK-NEXT: [[CONV1:%.*]] = bitcast [25 x

[PATCH] D101696: [Matrix] Implement C-style explicit type conversions in CXX for matrix types

2021-05-01 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements C-style explicit type conversions in CXX for matrix types. It is part of fixing https:/

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

2021-04-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D99037#2679131 , @fhahn wrote: > In D99037#2678848 , @SaurabhJha > wrote: > >> In D99037#2678779 , @fhahn wrote: >> >>> >> >> Will create a n

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

2021-04-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 336395. SaurabhJha added a comment. Replace `matrices` with `matrixes` in comments and rewrite the comment about element types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.o

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

2021-04-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D99037#2678779 , @fhahn wrote: > Will create a new patch to address your last comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D990

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

2021-04-09 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. > LGTM, thanks for working on this! Thanks so much Florian. Can you please also commit this on my behalf as I don't have commit access? Cheers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.l

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

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. The windows build failure is solved by itself and its all passing now! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 ___ cfe-commits

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

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/test/CodeGen/matrix-cast.c:82 + +void cast_unsigned_short_int_to_unsigned_int(unsigned_short_int_5x5 s, unsigned_int_5x5 i) { + // CHECK-LABEL: define{{.*}} void @cast_unsigned_short_int_to_unsigned_int(<25 x i16> %s, <25 x i

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

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 336154. SaurabhJha added a comment. Addressed latest round of comments. Also rebased with latest main as the windows build failed for some reason Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ http

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

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

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

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 336022. SaurabhJha added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: clang/include/clang/AST/OperationKinds.def clang/incl

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Hopefully this will work. My IDE is a bit wonky and it will take hours to rebuild for me after rebase. So pushed here with the hope that this could be validated using web build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1453 + CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_to_fp16, + CGF.CGM.FloatTy), + Res); Not sure why this was changed. Perhaps clang

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335913. SaurabhJha added a comment. Rebased with latest main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: clang/include/clang/AST/OperationKinds.def cl

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

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

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. I don't have commit rights so if it looks good to you, please commit on my behalf. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100051/new/ https://reviews.llvm.org/D100051

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335884. SaurabhJha added a comment. Rename the function to `EmitScalarCast` and directly returning from `if` branches now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100051/new/ https://reviews.llvm.org/D

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D100051#2674674 , @erichkeane wrote: > Hrmph... Phab ate my other comment, which was that the name > `EmitCastBetweenScalarTypes` feels clunky. Does `EmitScalarCast` or > `EmitScalarScalarCast` sound better and capture t

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. > I think the issue might be that adding this additional cast-kind caused the > value to exceed the maximum supported by the `CastExprBitfields`; the > bitfield can only store 64 values, but after adding `MatrixCast`, > `CK_IntToOCLSampler` will have value `64`, so a

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As prelude to this patch https://reviews.llvm.org/D99037, we want to move the int-float conversion into a separate function that can be reused by

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Okay interesting I should have posted before. Seems like when I move `MatrixCast` to the bottom of OperationKinds.def, and do nothing else, the matrix-cast CodeGen fails with this error. It is somehow not able to assign correct cast type. + /tmp/build/bin/clang -c

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

2021-04-07 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. 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 tests, it is failing with this curious `error: initializer element is not a compile-time

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

2021-04-06 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335680. SaurabhJha added a comment. Fix the bug with int <-> float conversion by explicitly passing llvm types to EmitCastBetweenScalarTypes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://

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

2021-04-06 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335677. SaurabhJha added a comment. I reverted the int <-> float conversion to previous code to make the tests pass. That way, we atleast have something working and we can go from there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-04-06 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335643. SaurabhJha added a comment. Changes in latest revision: - Updated definition of areMatrixTypesOfTheSameDimension to reflect the comment - Refactored casting between types into EmitCastBetweenScalarTypes - Removed mentions of "non matrix" - Replaced

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

2021-04-06 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/include/clang/AST/OperationKinds.def:185 +/// CK_MatrixCast - A cast between matrix types of the same dimensions. +CAST_OPERATION(MatrixCast) + This line is causing me issues that I don't know how to solve. If w

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

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

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

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

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

2021-04-05 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335216. SaurabhJha added a comment. Move back CK_MatrixCast definition to to just above CK_VectorSplat. The Matrix CodeGen is passing again but SemaOpenCL/sampler tests are failing again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-04-04 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335182. SaurabhJha added a comment. Move the definition of MatrixCast to the bottom in OperationKinds.def Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: cl

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

2021-04-04 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D99037#2668295 , @SaurabhJha wrote: > One other problem is somehow this test is failing > https://github.com/llvm/llvm-project/blob/main/clang/test/SemaOpenCL/sampler_t_overload.cl#L6 > with this error. > > /tmp/clang/tes

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

2021-04-04 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. One other problem is somehow this test is failing https://github.com/llvm/llvm-project/blob/main/clang/test/SemaOpenCL/sampler_t_overload.cl#L6 with this error. /tmp/clang/test/SemaOpenCL/sampler_t_overload.cl:6:30: error: initializer element is not a compile-time

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

2021-04-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335084. SaurabhJha added a comment. Update one inline comment in SemaCast.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: clang/include/clang/AST/Operat

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

2021-04-03 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 335083. SaurabhJha added a comment. 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...". When I tried this """ cx4x4 m1;

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

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha 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 explicit type conversions for matrix types

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 334951. SaurabhJha added a comment. Update commit message to more accurately reflect the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: clang/include

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

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Added some inline comments on where I have some doubts. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:547 + case CK_MatrixCast: { +// TODO: Handle MatrixCast here. + } I thought doing changes here is is

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

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 334945. SaurabhJha added a comment. Updating D99037 : [Matrix] Implement explicit type conversions for matrix types Removed unused variables and includes and fix codegen lit tests Repository: rG LLVM Github Monorepo CH

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

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. I pushed some unwanted changes that I used for debugging..fixing/removing them now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 _

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

2021-04-02 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 334942. SaurabhJha added a comment. Updating D99037 : [Matrix] Implement explicit type conversions for matrix types Latest update includes code gen for c style casts along with some lit tests Repository: rG LLVM Github

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

2021-04-01 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 334815. SaurabhJha added a comment. Herald added a subscriber: martong. 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_MatrixC

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

2021-04-01 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. 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 branch. Probably one mistake I did was to do a `git reset HEAD~1` and create a new com

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

2021-04-01 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Sorry, this revision was created by mistake. I just wanted to update https://reviews.llvm.org/D99037 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99765/new/ https://reviews.llvm.org/D99765

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

2021-04-01 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. Herald added subscribers: martong, tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [Matrix] Implement explicit type conversions for MatrixType. Bugzilla ticket is here: https://bugs.llv

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

2021-03-30 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Hey, I should mention that I am new to clang/llvm. My below thoughts could be wrong. > IIRC, making C-style casts work correctly in C++ will actually be easier if > you make one of the specialized casts do it; I'd say go ahead and do it in > `static_cast`. > > Casts

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

2021-03-30 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Hey @fhahn @rjmccall , Thank you so much for your reviews. Apart from the rest of your comments, here are the two principle things I am going to do next: 1. Replace the `reinterpret_cast`with `static_cast`. Do you think I should focus this revision to C-style casts

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

2021-03-30 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7315 +/// is not a scalar type. +bool Sema::areCompatibleMatrixTypes(QualType srcTy, QualType destTy) { + assert(destTy->isMatrixType() && srcTy->isMatrixType()); rjmccall wrote: > "Compat

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

2021-03-24 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Hey @fhahn , I realise, as you pointed out before, that we need to do some changes in CodeGen too. I think its going to be more involved so before starting on that, it would be great if you can confirm whether I am on the right path. I will describe what I did, what

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

2021-03-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. > I think you probably need to add new files for the tests, e.g. > `matrix-type-casts.cpp` & `matrix-type-casts.c` and then just add tests for > various valid cast combinations. Is that enough to get you started? You can > look at some of the existing matrix codegen

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

2021-03-22 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. In D99037#2640388 , @fhahn wrote: > Thanks for the patch! I think this also needs changes in code-gen & code-gen > tests. Hey @fhahn I searched but could not find the relevant code-gen and code-gen tests I need to fix. Can yo

  1   2   >