llvm-project/llvm/test
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
..
Analysis [tests] Add a couple tests for intersection of ec8d87e and D108651 2021-08-24 14:29:36 -07:00
Assembler The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
Bindings
Bitcode The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
BugPoint
CodeGen The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
DebugInfo [DebugInfo][InstrRef] Don't use instr-ref for unoptimised functions 2021-08-25 15:10:36 +01:00
Demangle
Examples [Orc][examples] Temporarily disable tests for the C API due to failures on sanitizer bots 2021-08-06 11:33:01 +02:00
ExecutionEngine [JITLink] Add support of R_X86_64_32S relocation 2021-08-22 16:45:25 +08:00
Feature
FileCheck
Instrumentation Revert D108432 "[InstrProfiling] Keep profd non-private for non-renamable comdat functions" 2021-08-24 19:16:07 -07:00
Integer
JitListener
LTO [InlineAdvisor] Add single quotes around caller/callee names 2021-08-10 11:51:31 -07:00
Linker [Linker] Import GlobalIFunc when importing symbols from another module 2021-08-14 22:01:11 -07:00
MC [ARC] Add ADC (addition with carry) and SBC (subtraction with carry) instructions 2021-08-25 07:46:15 -07:00
MachineVerifier [GlobalISel] Add G_LLROUND 2021-08-20 14:07:21 -07:00
Object [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it 2021-08-05 10:06:34 -07:00
ObjectYAML
Other [LoopPassManager] Assert that MemorySSA is preserved if used 2021-08-20 22:48:04 +02:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen
ThinLTO/X86 [Clang] add support for error+warning fn attrs 2021-08-25 10:34:18 -07:00
Transforms The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
Unit
Verifier The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
YAMLParser
tools [AArch64] Remove unpredictable from narrowing instructions. 2021-08-26 09:43:44 +01:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py [llvm][MC] Disable cfi-version test for Windows on Arm 2021-08-04 11:18:05 +00:00
lit.site.cfg.py.in