summaryrefslogtreecommitdiff
path: root/test/files/run/t9516.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-9516 Fix the behavior of Int shift Long operations. (#5117)Sébastien Doeraene2016-04-231-0/+52
In any shift operation where the lhs is an Int (or smaller) and the rhs is a Long, the result kind must be Int, and not Long. This is important because the lhs must *not* be promoted to a Long, as that causes an opcode for long shift to be emitted. This uses an rhs modulo 64, instead of int shifts which use an rhs module 32. Instead, the rhs must be downgraded to an Int. The new behavior is consistent with the same operations in the Java programming language.