cmd/compile: 64 bits shifts on arm get wrong results #48476
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
Should print 256 (0x100), instead prints 1099511628032 (0x10000000100) on arm.
The problem is we build a
SLLconst
with a shift amount > 32. That in itself is ok, but we then copy the shift amount into aORshiftLL
, where the top bits are magically discarded.The
SLL
with a large constant shift amount comes from the 64->32 bit lowering of shifts. We compute things likes-32
and32-s
(unsigned) for shift amounts in [0,63).The text was updated successfully, but these errors were encountered: