News for hackers. Stuff that matters.
Re:Future Directions for Optimizing Compilers by jcdavis on Monday September 10, 2018 @01:43PM (#17953528)
If you look at the llvm IR, it is using ashr (arithmetic shift), so you can probably assume this isn't targeting unsigned types
Re:Future Directions for Optimizing Compilers by Someone on Monday September 10, 2018 @02:14PM (#17953758)
The text also explicitly states this is about signed integers: ”let’s look at taking ((x << 31) >> 31) + 1, an inefficient idiom for isolating and flipping the low bit of a signed 32-bit integer”

I think there is an error on page 9, though: ”Second, −a+−b can be rewritten as −(a − b)”. I think that should be either a left-hand side of ”-a--b” or a right-hand side of ”-(a + b)”.