diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index cdce76462b4..5a9e2e6a49f 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -958,8 +958,11 @@ opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], False, "", "src0 >> (src1 & (sizeof(src0) * 8 - 1))", description = "Unsigned right-shift." + shift_note) -opcode("udiv_aligned_4", 0, tuint, [0], [tuint], False, "", - "src0 >> 2", description = "Divide a multiple of 4 by 4") +opcode("udiv_aligned_4", 0, tuint, [0], [tuint], False, "", """ +dst = src0 >> 2; +if (src0 & 3) + poison = true; +""", description = "Divide a multiple of 4 by 4") opcode("urol", 0, tuint, [0, 0], [tuint, tuint32], False, "", """ uint32_t rotate_mask = sizeof(src0) * 8 - 1;