XChy added a comment. Here is an optimized example related to the lookup table optimization in the issue in summary: add 1 <https://godbolt.org/z/xnhrqeGn9> CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155940/new/ https://reviews.llvm.org/D155940