Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That only matters for things with side-effects; and changing the `&&` to `&` doesn't get it to optimize anyway.

You can check - copy the LLVM IR from https://godbolt.org/z/EMPr4Yc84 into https://alive2.llvm.org/ce/ and it'll tell you that it is a valid refinement as far as compiler optimization goes.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: