stage2 cbe: correct airIsNull ptr operand check

This commit is contained in:
Veikka Tuominen 2022-08-05 20:53:34 +03:00
parent f46d7304b1
commit 0daa77bd63

View File

@ -3252,7 +3252,7 @@ fn airIsNull(
const ty = f.air.typeOf(un_op);
var opt_buf: Type.Payload.ElemType = undefined;
const payload_ty = if (ty.zigTypeTag() == .Pointer)
const payload_ty = if (deref_suffix[0] != 0)
ty.childType().optionalChild(&opt_buf)
else
ty.optionalChild(&opt_buf);