mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +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
4bf17f0a78
commit
16b331f5fd
@ -1799,12 +1799,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,
|
||||||
@ -1817,7 +1813,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,
|
||||||
@ -1862,7 +1857,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…
x
Reference in New Issue
Block a user