aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
AgeCommit message (Collapse)Author
2023-04-20wasm: integrate new Liveness behaviourLuuk de Gram
Uses the new liveness behaviour. This also removes useless calls to `processDeath` on branches that were just initialized. Branch consolidation and processing deaths on branches inside `condbr` is still a TODO, just like before. This also skips var_args on other native backends as they do not support this feature yet.
2023-04-20Liveness: avoid emitting unused instructions or marking their operands as usedmlugg
Backends want to avoid emitting unused instructions which do not have side effects: to that end, they all have `Liveness.isUnused` checks for many instructions. However, checking this in the backends avoids a lot of potential optimizations. For instance, if a nested field is loaded, then the first field access would still be emitted, since its result is used by the next access (which is then unreferenced). To elide more instructions, Liveness can track this data instead. For operands which do not have to be lowered (i.e. are not side effecting and are not something special like `arg), Liveness can ignore their operand usages, and push the unused information further up, potentially marking many more instructions as unreferenced. In doing this, I also uncovered a bug in the LLVM backend relating to discarding the result of `@cVaArg`, which this change fixes. A behaviour test has been added to cover it.
2023-04-20Sema: allow ptr field access on pointer-to-arraymlugg
Also remove an incorrect piece of logic which allowed fetching the 'len' property on non-single-ptrs (e.g. many-ptrs) and add a corresponding compile error test case. Resolves: #4765
2023-04-16behavior: disable flaky test on x86_64Jacob Young
Also reenable stage2_x86_64 windows behavior tests in case it is failing for the same reason. Closes #15324
2023-04-16x86_64: implement packed load and storeJacob Young
2023-04-15disable more failing C backend testsAndrew Kelley
2023-04-15disable not-yet-passing C backend testsAndrew Kelley
2023-04-15CI: more C backend test coverageAndrew Kelley
The CI now runs C backend tests in addition to compiling them. It uses -std=c99 -pedantic -Werror in order to catch non-conformant C code. This necessitated disabling a test case that caused a C compile error, in addition to disabling a handful of warnings that are already being triggered by Zig's C backend output for the behavior tests. The upshot is that I was able to, very cleanly, integrate the C backend tests into the build system, so that it communicates via the test runner protocol along with all the other behavior tests.
2023-04-13Merge pull request #15257 from Luukdegram/wasm-tagnameLuuk de Gram
wasm: Implement `@tagName` instruction
2023-04-13x86_64: fix constant pointers to zero-bit typesJacob Young
These non-dereferencable pointers still need to have the correct alignment and non-null-ness.
2023-04-13x86_64: fix atomic loop implementationJacob Young
2023-04-13x86_64: fix some of the mass confusion about the meaning of `MCValue`Jacob Young
2023-04-12wasm: enable `@tagName` behavior testsLuuk de Gram
2023-04-12Zir: implement explicit block_comptime instructionmlugg
Resolves: #7056
2023-04-10Merge pull request #14853 from schmee/vector-peer-type-resolutionAndrew Kelley
Vector type resolution/coercion fixes
2023-04-07Enable new testsAuguste Rame
2023-04-07Merge pull request #14668 from Techatrix/wasm-floatopsLuuk de Gram
wasm: implement float operations with compiler-rt
2023-04-07Liveness: defer deaths of externally-scoped instructions in loop bodiesmlugg
2023-04-05Sema: implement inline switch capture at comptimeVeikka Tuominen
Closes #15157
2023-04-03x86_64: implement cmp_lt_errors_lenJacob Young
2023-04-03x86_64: fix typosJacob Young
2023-04-03x86_64: implement store to immediate addressJacob Young
2023-04-03x86_64: implement storing large immediatesJacob Young
2023-04-02Sema: defer stores to inferred allocsJacob Young
This lets us generate the store with knowledge of the type to be stored. Therefore, we can avoid generating garbage Air with stores through pointers to comptime-only types which backends cannot lower. Closes #13410 Closes #15122
2023-04-02x86_64: implement shl with overflowJacob Young
2023-04-02x86_64: implement large add/sub with overflowJacob Young
2023-04-02x86_64: implement struct_field_val for large packed structsJacob Young
2023-04-02x86_64: implement large cmpJacob Young
2023-04-02x86_64: implement error nameJacob Young
2023-04-02x86_64: implement aggregate init of a packed structJacob Young
2023-03-30llvm: fix crashes when loading a struct fieldJacob Young
The result of buildStructGEP is not always a GEP (sorry), so we can't use getGEPResultElementType on it. Closes #14641
2023-03-28Sema: fix empty slice pointer valueJacob Young
We just checked that inst_child_ty was effectively a zero-bit type, so it is certainly not the non-zero alignment we are looking for. Closes #15085
2023-03-27x86_64: fix popcnt and disable regressed testJacob Young
2023-03-26wasm: implement float operations with compiler-rtTechatrix
2023-03-25x86_64: implement atomic loopsJacob Young
2023-03-25x86_64: fix cmpxchgJacob Young
2023-03-25x86_64: implement struct_field_val for packed containersJacob Young
2023-03-25x86_64: implement struct_field_ptr for packed containersJacob Young
2023-03-24x86_64: canonicalize each br of a blockJacob Young
2023-03-24x86_64: fix more value tracking bugsJacob Young
2023-03-24x86_64: fix value tracking bugsJacob Young
2023-03-21Sema: implement @export for arbitrary valuesmlugg
2023-03-21CBE: implement aggregateInit() for array of array case.Xavier Bouchoux
fixes `error(compilation): clang failed with stderr: error: array type 'uint32_t[10]' (aka 'unsigned int[10]') is not assignable`
2023-03-21Merge pull request #15028 from Vexu/compile-errorsVeikka Tuominen
Sema: improve error message of field access of wrapped type
2023-03-21x86_64: implement atomic and fence opsJacob Young
2023-03-21codegen: fix backend breakage due to optional layout changeJacob Young
2023-03-21x86_64: (re)implement optional opsJacob Young
Note that this commit also changes the layout of optional for all other backends using `src/codegen.zig` without updating them!
2023-03-21x86_64: implement some error union opsJacob Young
2023-03-21x86_64: implement @returnAddress and @frameAddressJacob Young
2023-03-21x86_64: implement basic float opsJacob Young