Commit Graph

329 Commits

Author SHA1 Message Date
gingerBill
2214d90997 Merge branch 'master' into bool_comparison_normalise 2026-08-25 15:31:19 +01:00
Jeroen van Rijn
5a994d4ea2 Merge pull request #7450 from kalsprite/mod_min_neg_one
Fix: `min(T) % -1` kills the process with SIGFPE, at every hardware width.
2026-08-25 01:32:21 -07:00
kalsprite
5628815bfe mod -1 2026-08-24 19:46:47 -07:00
kalsprite
4ecaa7dfd9 normalize bool cmp 2026-08-24 18:34:59 -07:00
kalsprite
c3bfbea235 big endian bool cmp 2026-08-24 18:15:01 -07:00
kalsprite
7fe49fbffb Fix compiler panic on a selector into 2026-08-21 16:38:56 -07:00
Jeroen van Rijn
6695ca537d Merge pull request #7087 from korvahkh/const-union-fixes
Implement fixes for constant unions
2026-08-20 03:35:36 +02:00
Jeroen van Rijn
e551ef5f15 Merge pull request #7397 from kalsprite/union_ternary_phi
backend: a union constant in a ternary or  builds an ill-typed phi
2026-08-20 03:24:04 +02:00
korvahkh
02246ac6fd Implement fixes for constant unions
Note that with this commit, casting through
multiply-nested unions is forbidden, e.g.
```
U :: union {int, V}
V :: union {bool}
x: U = true
```
does not compile.
(Previously the compiler would simply crash)

This is to avoid situations where adding variants
can lead to unexpected changes in the value.

For example if `U` is changed to have a `bool`
variant of its own:
```
U :: union {int, bool, V}
```
Then `x: U = true` would equal
`U(true)` instead of `U(V(true))`.

Single-variant unions are exempt, primarily to
improve the ergonomics of `Maybe` in cases like:
```
x: Maybe(union{int, bool}) = 1
```

Fix #6100
Fix #6699
Fix #6895
Fix #6896
Fix #6897
Fix #7036
Fix #7083
Fix #7091
2026-08-19 20:12:56 -05:00
kalsprite
a13a4b418d backend: a union constant in a ternary or builds an ill-typed phi 2026-08-19 16:45:58 -07:00
kalsprite
cf5f181228 peel union constant to its variant 2026-08-19 16:30:37 -07:00
Jeroen van Rijn
ec4dd3c959 Fix #7377
Allow `(-a).x` and `(+a).x` on a Vec2

Fixes #7377
2026-08-19 00:39:55 +02:00
gingerBill
9870cd4c36 Merge pull request #7271 from odin-lang/bill/inline-asm
`asm` templates
2026-08-18 19:19:40 +02:00
gingerBill
645b57be9f Merge pull request #7327 from kalsprite/abi_conformance
ABI Conformance Harness + Fixes
2026-08-17 16:28:01 +02:00
gingerBill
1f2234a4b2 Merge branch 'master' into bill/inline-asm 2026-08-17 11:44:14 +01:00
Mihail Moskov
e92c04eb73 Fixes the %% operator 2026-08-16 23:08:24 +03:00
kalsprite
db8aa97db7 matrix: take the input-vector load alignment from the vector 2026-08-15 19:56:26 -07:00
gingerBill
cb903df235 #side_effects -> #volatile; Remove dead code 2026-08-13 10:03:00 +01:00
Mihail Moskov
6a81351de3 fixes float to 128-bit int/uint conversion 2026-08-12 19:25:46 +03:00
Mihail Moskov
6dda0198f0 fixes f32 to 64-bit int/uint conversion 2026-08-12 16:02:49 +03:00
corley
87912a8b88 fixes range loop over array elements in soa containers 2026-08-11 03:20:13 +03:00
corley
e374541599 fixes chained indexing for soa containers with array element type 2026-08-09 22:23:32 +03:00
corley
7b45adf8e9 fixes swizzling for array elements in soa arrays/slices 2026-08-09 03:17:04 +03:00
Isabella Basso
e94d3d4871 llvm: handle #soa fixed compound literals for vars 2026-08-06 16:43:52 -03:00
gingerBill
a6af2551c6 Merge pull request #7039 from Znarf64/fix_subtype_comparisons
Fix subtype comparisons
2026-07-14 13:54:35 +01:00
Franz
269db77d51 Fix subtype comparisons 2026-07-14 13:46:54 +02:00
gingerBill
0694535d4e Correct arithmetic >> behaviour in LLVM IR 2026-07-12 00:07:51 +01:00
misomosi
f276d77c0c Fix misuse of lb_emit_(min|max) in simd_(min|max) 2026-07-01 10:59:03 -04:00
gingerBill
f602a6acd7 Fix #6725 #6798 #4943 2026-06-24 10:38:21 +01:00
gingerBill
baef272bbd Support constant compound literals 2026-06-22 12:53:27 +01:00
gingerBill
1c9fa5d0b7 Merge pull request #6731 from odin-lang/bill/expand-values-operator
Support `**` as `expand_values` operator: `**x` == `expand_values(x)`
2026-06-05 11:42:08 +01:00
gingerBill
8d1d126e16 Rearrange context and value_type values of lb_const_value 2026-06-05 10:19:55 +01:00
mlgudi
7ba07860bb Rearrange lb_emit_comp is_type_array_like branch to avoid unnecessary transmutes for bit_fields taking the non-inline path 2026-06-04 03:22:06 +01:00
mlgudi
2cc0f8f6dc Fix compiler assertion failure caused by comparison of array-backed bit_fields 2026-06-04 02:03:00 +01:00
gingerBill
fb8a9d0839 Support ** as expand_values operator: **x == expand_values(x) 2026-05-25 10:28:15 +01:00
gingerBill
e0781c0e40 Just change the type when transposing #row_major to #column_major matrix types 2026-05-12 17:19:49 +01:00
gingerBill
cd073bc797 Remove bad merge issue 2026-05-12 10:48:04 +01:00
gingerBill
8ac7819bf5 zero allocation 2026-05-12 10:44:01 +01:00
gingerBill
86a6f69793 General clean up 2026-05-11 14:01:50 +01:00
gingerBill
7d0dba1b82 Improve code generation for intrinsics.transpose 2026-05-11 13:41:30 +01:00
gingerBill
b752ff4bdb Add a minor optimization for row_major * row_major 2026-05-11 13:28:54 +01:00
gingerBill
58e4e6be24 Improve matrix * vector code generation 2026-05-11 13:14:02 +01:00
gingerBill
65ff188c1c Add optimization edge case for square mat * mat 2026-05-11 11:16:27 +01:00
gingerBill
9869c492f5 Fix #6642 2026-05-02 11:26:49 +01:00
Ionut Ciuperca
b043ff2c87 Fix compiler warning on linux.
The resulting compiler binary would also crash with a core dump when
trying to compile odin code with it.
2026-04-30 06:48:37 +01:00
gingerBill
bb291cfcd0 Use a for loop when doing array casts which are too long. 2026-04-28 13:45:57 +01:00
gingerBill
8ea1cbc230 Mock out vectorization of array binary arithmetic (probably not better in practice some of the time) 2026-04-24 18:19:41 +01:00
gingerBill
5c2efb78ac SIMD-ify [N]float -> [N]complex 2026-04-23 18:35:00 +01:00
gingerBill
a44b8b0af0 Support ([N]T)([N]U{...}) 2026-04-23 10:42:53 +01:00
gingerBill
ef275c5c0e Support []int{multiple_returns(), 123} 2026-04-21 17:45:36 +01:00