mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
nir/ifind_msb_rev: fix input check
ifind_msb_rev was introduced ina5747f8ab3. ifind_msb_rev guards against src0 being both 0 or -1 at the same time. That is always true. This patch changes it to check for those values individually. Spotted from a compile warning. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Fixes:a5747f8ab3(\"nir: add opcodes for *find_msb_rev and lowering\") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11630>
This commit is contained in:
parent
4504fabed6
commit
ffea622604
1 changed files with 1 additions and 1 deletions
|
|
@ -489,7 +489,7 @@ for (int bit = 31; bit >= 0; bit--) {
|
|||
|
||||
unop_convert("ifind_msb_rev", tint32, tuint, """
|
||||
dst = -1;
|
||||
if (src0 != 0 || src0 != -1) {
|
||||
if (src0 != 0 && src0 != -1) {
|
||||
for (int bit = 0; bit < 31; bit++) {
|
||||
/* If src0 < 0, we're looking for the first 0 bit.
|
||||
* if src0 >= 0, we're looking for the first 1 bit.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue