AdamNiederer / faster

SIMD for humans
Mozilla Public License 2.0
1.56k stars 51 forks source link

Incorrect count_ones result with -C target-cpu=native #54

Closed andersk closed 6 years ago

andersk commented 6 years ago
use {faster::Popcnt, std::simd::u64x4};
u64x4::new(!0, !0, 0, 0).count_ones()

correctly returns 128 without -C target-cpu=native, and incorrectly returns 18446744073709551488 (i.e. !127) with -C target-cpu=native.