diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-28 20:46:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-29 02:35:06 -0700 |
| commit | 40f8f0134f5da9baaefd0fdab529d5585fa46199 (patch) | |
| tree | d0204669c74b50f4ab971ea9422ac93685baafb5 /src/codegen/spirv/Module.zig | |
| parent | 1fc24e8d807a489254be46c9fcb951617a04f3b1 (diff) | |
| download | zig-40f8f0134f5da9baaefd0fdab529d5585fa46199.tar.gz zig-40f8f0134f5da9baaefd0fdab529d5585fa46199.zip | |
Sema: enhance div_trunc, div_exact, div_floor
* No longer emit div_exact AIR instruction that can produce a
remainder, invoking undefined behavior.
* div_trunc, div_exact, div_floor are extracted from analyzeArithmetic
and directly handled similarly to div_trunc, integrating them with
integer overflow safety checking.
* Also they no longer emit divide-by-zero safety checking when RHS
is comptime known to be non-zero.
Diffstat (limited to 'src/codegen/spirv/Module.zig')
0 files changed, 0 insertions, 0 deletions
