mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Air: Fix mustLower() to consider volatile for a handful of instructions.
These can all potentially operate on volatile pointers.
This commit is contained in:
parent
47aaaec6ea
commit
5c2e300f42
1 changed files with 2 additions and 6 deletions
|
|
@ -1817,12 +1817,8 @@ pub fn mustLower(air: Air, inst: Air.Inst.Index, ip: *const InternPool) bool {
|
||||||
.cmp_vector_optimized,
|
.cmp_vector_optimized,
|
||||||
.is_null,
|
.is_null,
|
||||||
.is_non_null,
|
.is_non_null,
|
||||||
.is_null_ptr,
|
|
||||||
.is_non_null_ptr,
|
|
||||||
.is_err,
|
.is_err,
|
||||||
.is_non_err,
|
.is_non_err,
|
||||||
.is_err_ptr,
|
|
||||||
.is_non_err_ptr,
|
|
||||||
.bool_and,
|
.bool_and,
|
||||||
.bool_or,
|
.bool_or,
|
||||||
.fptrunc,
|
.fptrunc,
|
||||||
|
|
@ -1835,7 +1831,6 @@ pub fn mustLower(air: Air, inst: Air.Inst.Index, ip: *const InternPool) bool {
|
||||||
.unwrap_errunion_payload,
|
.unwrap_errunion_payload,
|
||||||
.unwrap_errunion_err,
|
.unwrap_errunion_err,
|
||||||
.unwrap_errunion_payload_ptr,
|
.unwrap_errunion_payload_ptr,
|
||||||
.unwrap_errunion_err_ptr,
|
|
||||||
.wrap_errunion_payload,
|
.wrap_errunion_payload,
|
||||||
.wrap_errunion_err,
|
.wrap_errunion_err,
|
||||||
.struct_field_ptr,
|
.struct_field_ptr,
|
||||||
|
|
@ -1880,7 +1875,8 @@ pub fn mustLower(air: Air, inst: Air.Inst.Index, ip: *const InternPool) bool {
|
||||||
.work_group_id,
|
.work_group_id,
|
||||||
=> false,
|
=> false,
|
||||||
|
|
||||||
.load => air.typeOf(data.ty_op.operand, ip).isVolatilePtrIp(ip),
|
.is_non_null_ptr, .is_null_ptr, .is_non_err_ptr, .is_err_ptr => air.typeOf(data.un_op, ip).isVolatilePtrIp(ip),
|
||||||
|
.load, .unwrap_errunion_err_ptr => air.typeOf(data.ty_op.operand, ip).isVolatilePtrIp(ip),
|
||||||
.slice_elem_val, .ptr_elem_val => air.typeOf(data.bin_op.lhs, ip).isVolatilePtrIp(ip),
|
.slice_elem_val, .ptr_elem_val => air.typeOf(data.bin_op.lhs, ip).isVolatilePtrIp(ip),
|
||||||
.atomic_load => switch (data.atomic_load.order) {
|
.atomic_load => switch (data.atomic_load.order) {
|
||||||
.unordered, .monotonic => air.typeOf(data.atomic_load.ptr, ip).isVolatilePtrIp(ip),
|
.unordered, .monotonic => air.typeOf(data.atomic_load.ptr, ip).isVolatilePtrIp(ip),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue