From: Adam Jackson Date: Tue, 21 Jul 2015 16:08:20 +0000 (-0400) Subject: r600/sb: Fix an &/&& mistake X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b4a7ec8f1d2eee12895541bb5c7d15382370884;p=mesa.git r600/sb: Fix an &/&& mistake gcc says: sb/sb_sched.cpp: In member function 'bool r600_sb::alu_group_tracker::try_reserve(r600_sb::alu_node*)': sb/sb_sched.cpp:492:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] if (!trans & fbs) It happens to be harmless; if fbs is ever non-zero, it will be VEC_210, which is 5, so (!trans & 5) == 1 and the branch works as expected. But logical AND is clearly what was meant. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson --- diff --git a/src/gallium/drivers/r600/sb/sb_sched.cpp b/src/gallium/drivers/r600/sb/sb_sched.cpp index 2e38a62c05a..62680788c5e 100644 --- a/src/gallium/drivers/r600/sb/sb_sched.cpp +++ b/src/gallium/drivers/r600/sb/sb_sched.cpp @@ -489,7 +489,7 @@ bool alu_group_tracker::try_reserve(alu_node* n) { n->bc.bank_swizzle = 0; - if (!trans & fbs) + if (!trans && fbs) n->bc.bank_swizzle = VEC_210; if (gpr.try_reserve(n)) {