Skip to content

broadcom/compiler: remove always true condition

Juan A. Suárez requested to merge jasuarez/mesa:review/vir-dump into master

qpu.raddr_b is an unsigned int, so it is always positive, even after casting to signed int.

Thus, (int) inst->qpu.raddr_b >= -16 is always true, so it can be removed from the condition.

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 "&&".

Merge request reports

Loading