llvm-project/clang/test/CXX/drs
Roman Lebedev 564d85e090
The maximal representable alignment in LLVM IR is 1GiB, not 512MiB
In LLVM IR, `AlignmentBitfieldElementT` is 5-bit wide
But that means that the maximal alignment exponent is `(1<<5)-2`,
which is `30`, not `29`. And indeed, alignment of `1073741824`
roundtrips IR serialization-deserialization.

While this doesn't seem all that important, this doubles
the maximal supported alignment from 512MiB to 1GiB,
and there's actually one noticeable use-case for that;
On X86, the huge pages can have sizes of 2MiB and 1GiB (!).

So while this doesn't add support for truly huge alignments,
which i think we can easily-ish do if wanted, i think this adds
zero-cost support for a not-trivially-dismissable case.

I don't believe we need any upgrade infrastructure,
and since we don't explicitly record the IR version,
we don't need to bump one either.

As @craig.topper speculates in D108661#2963519,
this might be an artificial limit imposed by the original implementation
of the `getAlignment()` functions.

Differential Revision: https://reviews.llvm.org/D108661
2021-08-26 12:53:39 +03:00
..
dr0xx.cpp Remove redundant check for access in the conversion from the naming 2020-11-29 19:21:59 -08:00
dr1xx.cpp Implement P1949 2021-08-18 07:33:14 -04:00
dr2xx.cpp Implement P1949 2021-08-18 07:33:14 -04:00
dr3xx.cpp [clang] Stop providing builtin overload candidate for relational function pointer comparisons 2021-06-26 00:08:02 +02:00
dr4xx.cpp Explain why the array bound is non-constant in VLA diagnostics. 2020-08-19 15:45:51 -07:00
dr5xx.cpp
dr6xx.cpp The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
dr7xx.cpp Undo removal of test for dr777. 2020-06-02 14:19:42 -07:00
dr9xx.cpp [clang][NFC] Mark CWG 974 and 1814 (default argument in a... 2020-06-13 13:49:07 +01:00
dr10xx.cpp
dr11xx.cpp
dr12xx.cpp
dr13xx.cpp Always deduce the lengths of contained parameter packs when deducing a 2020-01-06 17:24:29 -08:00
dr14xx.cpp CWG2076: Permit implicit conversions within a single level of braces 2021-04-22 16:49:39 -07:00
dr15xx.cpp [clang] Stop providing builtin overload candidate for relational function pointer comparisons 2021-06-26 00:08:02 +02:00
dr16xx.cpp When diagnosing an ambiguity, only note the candidates that contribute 2019-10-24 14:58:29 -07:00
dr17xx.cpp DR1753: Don't permit x.NS::~T() as a pseudo-destructor name. 2020-01-24 18:53:50 -08:00
dr18xx.cpp [clang][NFC] Mark CWG 974 and 1814 (default argument in a... 2020-06-13 13:49:07 +01:00
dr19xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr20xx.cpp CWG2076: Permit implicit conversions within a single level of braces 2021-04-22 16:49:39 -07:00
dr21xx.cpp DR1413 and part of P1815R2: Minor improvements to Clang's determination 2020-12-15 14:53:26 -08:00
dr22xx.cpp PR23029 / C++ DR2233: Allow expanded parameter packs to follow 2020-06-02 13:48:59 -07:00
dr23xx.cpp [Sema] Use the proper cast for a fixed bool enum. 2020-08-16 18:40:08 +02:00
dr118.cpp
dr158.cpp
dr412.cpp
dr1748.cpp