[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-02-22 Thread Mario Sanchez Prada via Phabricator via cfe-commits
mariospr added a comment. In D117238#3338205 , @aaron.ballman wrote: > In D117238#3338092 , @erichkeane > wrote: > >> Hi Mario! Thank you for inquiring! As you may know, we disabled _BitInt >> this large sinc

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-02-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117238#3338092 , @erichkeane wrote: > In D117238#3338071 , @mariospr > wrote: > >> In D117238#3270125 , >> @aaron.ballman wrote: >> >

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-02-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: mgehre-amd. erichkeane added a comment. In D117238#3338071 , @mariospr wrote: > In D117238#3270125 , @aaron.ballman > wrote: > >> Updated to allow targets to specify the max bitwidt

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-02-22 Thread Mario Sanchez Prada via Phabricator via cfe-commits
mariospr added a comment. In D117238#3270125 , @aaron.ballman wrote: > Updated to allow targets to specify the max bitwidth. I was aware that the > x86 backend had issues with doing division on larger `_BitInt` objects, but > it turns out *all* backend

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117238#3281010 , @jkorous wrote: > I verified locally that reverting this patch fixes the build. > Reverted in fad7e491a0770ac4336934030ac67d77e7af5520 >

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-28 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I verified locally that reverting this patch fixes the build. Reverted in fad7e491a0770ac4336934030ac67d77e7af5520 to unblock Green Dragon, etc. @aaron.ballman Please take a look when you get a chance.

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-28 Thread Shubham Sandeep Rastogi via Phabricator via cfe-commits
rastogishubham added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2271-2274 + const TargetInfo &TI = getASTContext().getTargetInfo(); + if (NumBits > TI.getMaxBitIntWidth()) { Diag(Loc, diag::err_bit_int_max_size) +<< IsUnsigned << TI.getMaxBitIntWidth(

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-28 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @aaron.ballman I believe this change broke the build starting with: https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/26915/ /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/clang/include/clang/Basic/Diagnostic.h:

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thank you for the reviews! I've commit in 86797fdb6f51d32f285e48b6d3e0fc5b8b852734 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117238/new/ https:

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-28 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. No additional comments, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117238/new/ https://reviews.llvm.org/D117238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping @jyknight -- I'd like to get this in before the Clang 14 branch, if possible. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117238/new/ https://reviews.llvm.org/D117238 ___ cfe-commits mailing list cfe-com

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. Accept again, thanks! Note the purpose of the assert is to make sure that a backend doesn't make a bad decision, and the test for 'max size' is only validating 1 backend (AND has now been changed to >128 I think). CHANGES SINCE LA

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 403008. aaron.ballman added a comment. Updated based on review feedback. I added an additional assert to test that the value picked by the target meets the requirements from the C standard. (We already had a test case for it in lit, but no reason not t

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:917 + Builder.defineMacro("__BITINT_MAXWIDTH__", Twine(TI.getMaxBitIntWidth())); + Could you do an assert that TI.getMaxBitIntWidth() is not greater than the LLVM maximum (j

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 402971. aaron.ballman added a comment. Herald added subscribers: pcwang-thead, luke957, s.egerton, simoncook, fedor.sergeev. Updated to allow targets to specify the max bitwidth. I was aware that the x86 backend had issues with doing division on larger

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping @jyknight or @rsmith for any final thoughts or concerns? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117238/new/ https://reviews.llvm.org/D117238 ___ cfe-commits mai

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Preprocessor/init.c:1523 // WEBASSEMBLY-NEXT:#define __BIGGEST_ALIGNMENT__ 16 +// WEBASSEMBLY-NEXT:#define __BITINT_MAXWIDTH__ 8388608 // WEBASSEMBLY-NEXT:#define __BOOL_WIDTH__ 8 aaron.ballman wrote: > e

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/init.c:1523 // WEBASSEMBLY-NEXT:#define __BIGGEST_ALIGNMENT__ 16 +// WEBASSEMBLY-NEXT:#define __BITINT_MAXWIDTH__ 8388608 // WEBASSEMBLY-NEXT:#define __BOOL_WIDTH__ 8 erichkeane wrote: > A

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Preprocessor/init.c:1523 // WEBASSEMBLY-NEXT:#define __BIGGEST_ALIGNMENT__ 16 +// WEBASSEMBLY-NEXT:#define __BITINT_MAXWIDTH__ 8388608 // WEBASSEMBLY-NEXT:#define __BOOL_WIDTH__ 8 Actually why are we

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. CFE changes LGTM, the limits.h/.cpp changes LOOK right, but please give others a chance to take a look. Comment at: clang/lib/Sema/SemaType.cpp:2270 + // The max

[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

2022-01-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, jyknight, rsmith. Herald added a subscriber: dschuff. aaron.ballman requested review of this revision. Herald added a subscriber: aheejin. Herald added a project: clang. Part of the `_BitInt` feature in C2x (http://ww