[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 25 11:01:22 PST 2022


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 `_BitInt` objects, but it turns out *all* backends fail to support `_BitInt(129)` or wider division. Because division is a pretty common operation on numeric data types, it seemed to be more user-friendly to specify that we only support 128 bits or less. I tried to make it exceptionally clear that I consider this to be a backend bug though -- we will support wider bit widths in the future once backends have been fixed. These changes make that future path easier to opt into.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117238/new/

https://reviews.llvm.org/D117238

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/TargetInfo.h
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Headers/limits.h
  clang/lib/Sema/SemaType.cpp
  clang/test/CodeGen/ext-int-cc.c
  clang/test/CodeGen/ext-int.c
  clang/test/CodeGenCXX/ext-int.cpp
  clang/test/Headers/limits.cpp
  clang/test/Preprocessor/init-aarch64.c
  clang/test/Preprocessor/init.c
  clang/test/Sema/builtins-overflow.c
  clang/test/SemaCXX/ext-int.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117238.402971.patch
Type: text/x-patch
Size: 32809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220125/30e6e1ed/attachment-0001.bin>


More information about the cfe-commits mailing list