Skip to content

nir/lower_int64: fix shift lowering

Karol Herbst requested to merge karolherbst/mesa:nir/fix_int64_shift into main

nir shifts are defined to only look at the least significant bits. The lowering has take this into account.

So there are two things going on:

  1. the ieq and uge further down depend on y being masked.
  2. the calculation of reverse_count actually depends on a masked y as well, due to the (iabs (iadd y -32)) giving a different result for shifts > 31;

Fixes: 41f3e9e5 ("nir: Implement lowering of 64-bit shift operations") Signed-off-by: Karol Herbst kherbst@redhat.com

Edited by Karol Herbst

Merge request reports