A small optimization suggested by jakehehrlich@ in D64790.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 39628 Build 39659: arc lint + arc unit
Event Timeline
llvm/include/llvm/Support/Alignment.h | ||
---|---|---|
174 | IIUC, -value is just the same as ~(value - 1). but only works if the representation two's complement. C++ does not guarantee two's complement. What about using ~(value - 1) instead ? |
IIUC, -value is just the same as ~(value - 1). but only works if the representation two's complement. C++ does not guarantee two's complement. What about using ~(value - 1) instead ?
https://godbolt.org/z/8KJBV3