News for hackers. Stuff that matters.
Re:The surprising cleverness of modern compilers by gjm11 on Tuesday May 24, 2016 @03:33PM (#11764800)
One of the comments on that article links to this https://llvm.org/bugs/show_bug.cgi?id=1488 which rather suggests that this surprisingly specific optimization was added in order to speed up some calculations in one of the SPEC benchmarks.

(The benchmark in question is code from a chess program called Crafty, which represents a chess position as a bunch of 64-bit bitmaps. Unsurprisingly, 64-bit popcount is quite often useful for this.)

Re:The surprising cleverness of modern compilers by treerex on Tuesday May 24, 2016 @04:27PM (#11765193)
Compiler vendors have been doing stuff like this (recognizing specific code patterns from common benchmarks) for 30 years, back in the days when there was real competition amongst C compilers (Borland vs. Zortech, for example.)
Re:The surprising cleverness of modern compilers by gjm11 on Thursday May 26, 2016 @05:04AM (#11776596)
Yup. But the HN discussion of this one seemed to be treating it as an instance of compilers being terribly clever to benefit their actual users, rather than yet another benchmark hack.