about summary refs log tree commit diff
path: root/src/test/codegen/intrinsics
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-328/+0
2022-08-21fix `ptr_mask` codegen test wrt llvm opaque pointersMaybe Waffle-1/+1
2022-08-21Do not use void pointer for `ptr_mask` intrinsicMaybe Waffle-2/+2
I couldn't find where exactly it's documented, but apperantly pointers to void type are invalid in llvm - void is only allowed as a return type of functions.
2022-08-21make `ptr_mask` codegen test more specificMaybe Waffle-1/+5
2022-08-21Add codegen test for `intinsics::ptr_mask`Maybe Waffle-0/+7
2022-07-08Support unstable moves via stable in unstable itemsJane Lusby-0/+1
2022-05-25Update some codegen tests for opaque pointersNikita Popov-21/+21
2022-05-11Add `unsigned_offset_from` on pointersScott McMurray-0/+36
Like we have `add`/`sub` which are the `usize` version of `offset`, this adds the `usize` equivalent of `offset_from`. Like how `.add(d)` replaced a whole bunch of `.offset(d as isize)`, you can see from the changes here that it's fairly common that code actually knows the order between the pointers and *wants* a `usize`, not an `isize`. As a bonus, this can do `sub nuw`+`udiv exact`, rather than `sub`+`sdiv exact`, which can be optimized slightly better because it doesn't have to worry about negatives. That's why the slice iterators weren't using `offset_from`, though I haven't updated that code in this PR because slices are so perf-critical that I'll do it as its own change. This is an intrinsic, like `offset_from`, so that it can eventually be allowed in CTFE. It also allows checking the extra safety condition -- see the test confirming that CTFE catches it if you pass the pointers in the wrong order.
2021-10-14fix codegen testDeadbeef-2/+2
2021-10-12Add const_eval_select intrinsicDeadbeef-0/+17
2021-04-03Manually set dso_local when its valid to do soSimonas Kazlauskas-1/+1
This should have no real effect in most cases, as e.g. `hidden` visibility already implies `dso_local` (or at least LLVM IR does not preserve the `dso_local` setting if the item is already `hidden`), but it should fix `-Crelocation-model=static` and improve codegen in executables. Note that this PR does not exhaustively port the logic in [clang]. Only the obviously correct portion and what is necessary to fix a regression from LLVM 12 that relates to `-Crelocation_model=static`. Fixes #83335 [clang]: https://github.com/llvm/llvm-project/blob/3001d080c813da20b329303bf8f45451480e5905/clang/lib/CodeGen/CodeGenModule.cpp#L945-L1039
2020-12-31remove move_val_init leftoversRalf Jung-19/+0
2020-07-13Added ui tests for volatile and nearby intrinsicsTeddy_Wang-0/+18
2020-07-12Added tests for volatile and nearbyint intrinsicsTeddy_Wang-0/+73
2020-01-07Account for pointer type suffix in prefetch testNikita Popov-16/+16
2019-06-04improve test indentationlcnr/Bastian Kauschke-2/+2
2019-06-04move intrinsics codegen tests into a seperate folderlcnr/Bastian Kauschke-0/+191