ir3: Make shift operand 64-bit.

Fix defect reported by Coverity Scan.

Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression 2 << W
with type int (32 bits, signed) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression
of type uint64_t (64 bits, unsigned).

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14258>
This commit is contained in:
Vinson Lee 2021-12-19 15:41:51 -08:00 committed by Marge Bot
parent b293299776
commit 1d6f6f9102
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ SOFTWARE.
</display>
<derived name="CLUSTER_SIZE" type="uint">
<expr>
2 &lt;&lt; {W}
2ULL &lt;&lt; {W}
</expr>
</derived>
<pattern low="32" high="36">xxxxx</pattern> <!-- INDEX -->