agx: fix botched address fuses
identified in dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.unroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.2d.comp. owwie. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
This commit is contained in:
committed by
Marge Bot
parent
b589285468
commit
0a43be6d4f
@@ -82,8 +82,10 @@ pass(struct nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
||||
uint32_t shift = MIN2(__builtin_ctz(raw_scalar), max_shift);
|
||||
int64_t k = raw_scalar >> shift;
|
||||
|
||||
/* See if the reduced scalar is from a sign extension. */
|
||||
if (k > INT32_MAX || k < INT32_MIN)
|
||||
/* See if the reduced scalar is from a sign extension. We must have
|
||||
* at least the format shift to avoid underflowing.
|
||||
*/
|
||||
if (k > INT32_MAX || k < INT32_MIN || shift < format_shift)
|
||||
break;
|
||||
|
||||
/* Match the constant */
|
||||
|
||||
Reference in New Issue
Block a user