]> git.lizzy.rs Git - rust.git/commit
Handle shifts properly
authorScott McMurray <scottmcm@users.noreply.github.com>
Mon, 20 Nov 2017 09:54:43 +0000 (01:54 -0800)
committerScott McMurray <scottmcm@users.noreply.github.com>
Mon, 20 Nov 2017 09:54:43 +0000 (01:54 -0800)
commit42208c122757fca706bc5224f3a0c7200fae32e9
tree83e34bff2c2bfdecea7387d3354a9dc7f3a93b8d
parent6a5a086fd61a87d36cfa3652b279c543601860da
Handle shifts properly

* The overflow-checking shift items need to take a full 128-bit type, since they need to be able to detect idiocy like `1i128 << (1u128 << 127)`
* The unchecked ones just take u32, like the `*_sh?` methods in core
* Because shift-by-anything is allowed, cast into a new local for every shift
src/librustc_mir/transform/lower_128bit.rs
src/test/mir-opt/lower_128bit_debug_test.rs
src/test/mir-opt/lower_128bit_test.rs