Commit graph

13 commits

Author SHA1 Message Date
Martin Kinkelin
3840a03af4
Don't emit init symbol for zero-initialized structs (#3131)
And optimize previous usages of it to direct memset-zero.
2019-09-12 00:30:09 +02:00
Martin
bda56b7263 Adapt lit-tests to new mangling scheme
Only those failing on Win64 so far.
2017-11-05 21:58:12 +01:00
Johan Engelen
09cef87178 Fix alignment test for ARM. (#1968) 2017-01-16 20:19:38 +01:00
Martin
ab1432ed06 Use the regular LL type for all init symbols and most globals
There's no <Type>_init type for aggregates (structs and classes) anymore,
effectively eliminating a *lot* of named LLVM types, some bitcasts as well
as replacements of globals etc.

To get there, it was even required to use the regular type for compatible
literals too, otherwise structs embedded as fields in other aggregates had
an anonymous type (well, the LLVM constant for the field initializer had)
and so the container initializer wasn't compatible with the regular type
anymore.

What was also necessary was a fix wrt. static arrays of bools (LLVM
constant of type `[N x i1]` vs. `[N x i8]` for regular type).
I also had to change the initializer for `char[2][3] x = 0xff` from
`[6 x i8]` to `[3 x [2 x i8]]`, i.e., NOT flattening multi-dimensional
inits from a scalar.

So only literals with overlapping (union) fields and an explicit
initializer initializing dominated non-alias union fields should still
have a mismatching anonymous type - i.e., very, very few cases.
2016-10-23 02:52:51 +02:00
Johan Engelen
7e572e6f03 Allow align(1) for global variables.
This reverts a39997d326, and fixes the invalid tests in std.conv.
2016-10-12 12:18:46 +02:00
Martin
879fb97d56 Rename retvar to sretPointer 2016-07-02 12:52:21 +02:00
Johan Engelen
0a765ade47 Mark alignment test as expected failure on Windows x86, due to issue #1356. 2016-05-24 22:13:53 +02:00
Kai Nacke
88f3de8bea Merge branch 'ltsmaster' 2016-03-22 19:05:07 +01:00
Martin
1693e7a4e7 Lit tests: Fix alignment checks wrt. sret for 32-bit x86
We substitute the `sret` attribute by `inreg` for that ABI to make sure
the pointer is passed in a register.
2016-03-16 19:45:38 +01:00
Martin
4ecfadbc1c MSVC: Re-enable alignment attribute for sret params
Seems to be working with recent LLVM - at least for x64.
2016-03-16 19:45:37 +01:00
Martin
bbb9b7a479 Lit tests: Allow for extra calling conventions and name mangling
Required by 32-bit MSVC.
2016-03-16 19:45:37 +01:00
Johan Engelen
bbe6373e25 Desensitize alignment codegen test to LLVM variable numbering. [NFC] 2016-03-04 19:40:54 +01:00
Johan Engelen
8ac39a4f2d Relocate the Lit-based testsuite to /tests (from /tests/ir).
The plan is to have subdirs for grouping tests. For example, for PGO we could create the /tests/pgo folder. Lit automatically picks up on subdirs.
2016-02-29 00:34:37 +01:00
Renamed from tests/ir/align.d (Browse further)