[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-11-11 Thread Simon Moll via Phabricator via cfe-commits
simoll abandoned this revision. simoll added a comment. Taking this off the review queues - we will use the `ext_vector_type` attribute instead (D88905 ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-10-06 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. D88905 uses ext_vector_type instead of vector_size following up on @rsmith 's suggestion . The review should continue there. I'll keep D81083 around for

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-10-05 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 296137. simoll added a comment. (wrong Diff attached in earlier update) - rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files:

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-10-05 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 296135. simoll added a comment. Herald added subscribers: llvm-commits, nikic, pengfei, hiraditya, mgorny. Herald added a project: LLVM. fixed for privatized ElementCount members. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-09-29 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. I'd like to hear your feedback on how to proceed with this patch. Here is what i would do: For this patch, we switch to ext_vector_type for bool vectors to not clash head on with GCC should GCC decide to allow vector_size bool with a different semantics in the future.

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-09-04 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 289893. simoll added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst clang/include/clang/AST/Type.h

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-26 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. In D81083#2237284 , @rsmith wrote: > Thanks for dropping by! > Have you considered using the `ext_vector_type` attribute instead of > `vector_size` for this? That would have a couple of advantages: > > - It's not a GCC

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Have you considered using the `ext_vector_type` attribute instead of `vector_size` for this? That would have a couple of advantages: - It's not a GCC attribute, so there's no risk that GCC would give different meaning to the same syntax (such as using one byte per

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-25 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 287692. simoll added a comment. NFC. Make clang-tidy happy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-25 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 287658. simoll added a comment. - made bool-vector layout target dependent (one byte per bool element on Hexagon, one bit everywhere else). - Added hvx-specific debug info test. - Updated docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-24 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. The Hexagon builtins explicitly require bool vectors to have 8-bit wide bool elements. That clashes with our new vector type because bool vectors in builtin functions and vector_size bool vectors have the same internal representation in Clang. However, AFAIK Hexagon is

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-21 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. In D81083#2227760 , @rsandifo-arm wrote: > I'm not qualified to review the CodeGen stuff (or accept the patch, obvs. > :-)) but FWIW, here are some comments on the doc and Sema side. Thanks for your comments! Maybe you know

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-21 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 286971. simoll edited the summary of this revision. simoll added a comment. - Rebased. - Allow comparisons on boolean vectors. - Restored result type for vector comparisons on other types. - Added operator, alignment and constexpr tests. Repository: rG

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-21 Thread Simon Moll via Phabricator via cfe-commits
simoll marked 4 inline comments as done. simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:492 + +The memory representation of a boolean vector is the smallest fitting +power-of-two integer. The alignment is the alignment of that integer type. This

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-21 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:492 + +The memory representation of a boolean vector is the smallest fitting +power-of-two integer. The alignment is the alignment of that integer type. This simoll wrote: >

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-20 Thread Simon Moll via Phabricator via cfe-commits
simoll planned changes to this revision. simoll marked 6 inline comments as done. simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:492 + +The memory representation of a boolean vector is the smallest fitting +power-of-two integer. The alignment is the

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-20 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. I'm not qualified to review the CodeGen stuff (or accept the patch, obvs. :-)) but FWIW, here are some comments on the doc and Sema side. It might be good to have more Sema tests for valid and invalid usage, e.g. for which operators are valid and which aren't.

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-19 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. Thank you preparing this i1 patch and doing it on clang side only. We were testing this patch and sending problem reports. Now, we can use this patch without modifying llvm code. We can define vector mask types like below. Then, we can define intrinsic functions using

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-13 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 285282. simoll added a comment. - Fixed type printing & added type printing test. - Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files:

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-06 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 283636. simoll added a comment. NFC. Cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-06 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 283632. simoll added a comment. Fixed debug info representation for bool vectors. Interpret 8*N with the N in vector_size(N) as the bool numbers of bits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Simon Moll via Phabricator via cfe-commits
simoll planned changes to this revision. simoll added a comment. Thanks for the feedback! Planned change: interpret the `N` in `vector_size(N)` as the number of bytes in the type, such that, for example, a `vector_size(2)` bool vector holds 16 bits Repository: rG LLVM Github Monorepo

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Simon Moll via Phabricator via cfe-commits
simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Simon Moll via Phabricator via cfe-commits
simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Simon Moll via Phabricator via cfe-commits
simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a subscriber: lenary. rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-31 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. Thank you for implementing `EmitFromMemory`. We are locally trying to use this patch to implement vector mask intrinsic instructions on Aurora VE. It is working well with regression tests. We will try test-suite next. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-30 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 281878. simoll added a comment. NFC - Style updates - Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-30 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 281844. simoll added a comment. Updated clang test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-28 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 281322. simoll added a comment. - Rebased - Implement `EmitFromMemory` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-04 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 268488. simoll added a comment. - Improved documentation for the size argument of vector_size. - Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files:

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-04 Thread Simon Moll via Phabricator via cfe-commits
simoll marked an inline comment as done. simoll added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-04 Thread Simon Moll via Phabricator via cfe-commits
simoll marked 2 inline comments as done. simoll added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:4710 if (!CGF.CGM.getCodeGenOpts().PreserveVec3Type) { - auto *Vec4Ty = llvm::FixedVectorType::get( + auto Vec4Ty = llvm::VectorType::get(

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-03 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 268140. simoll added a comment. NFC. Undid stray change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81083/new/ https://reviews.llvm.org/D81083 Files: clang/docs/LanguageExtensions.rst

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-06-03 Thread Simon Moll via Phabricator via cfe-commits
simoll created this revision. simoll added reviewers: hfinkel, erichkeane, craig.topper, rsandifo-arm, kaz7, k-ishizaka. simoll added a project: clang. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a reviewer: rengolin. simoll updated this revision to Diff 268140. simoll