broadcom/compiler: use signed pointers for packed condition
`qpu.raddr_b` is an unsigned int, so it is always positive, even after casting to signed int. Fixes CID#1438117 "Operands don't affect result (CONSTANT_EXPRESSION_RESULT)": "result_independent_of_operands: (int)inst->qpu.raddr_b >= -16 is always true regardless of the values of its operands. This occurs as the logical first operand of "&&". v2: - Use signed pointers (Iago) Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10131>
This commit is contained in:
parent
16fd5bd996
commit
e7f4f1b582
|
@ -174,8 +174,8 @@ vir_print_reg(struct v3d_compile *c, const struct qinst *inst,
|
|||
&unpacked);
|
||||
assert(ok); (void) ok;
|
||||
|
||||
if ((int)inst->qpu.raddr_b >= -16 &&
|
||||
(int)inst->qpu.raddr_b <= 15)
|
||||
int8_t *p = (int8_t *)&inst->qpu.raddr_b;
|
||||
if (*p >= -16 && *p <= 15)
|
||||
fprintf(stderr, "%d", unpacked);
|
||||
else
|
||||
fprintf(stderr, "%f", uif(unpacked));
|
||||
|
|
Loading…
Reference in New Issue