DianQK wrote: Sorry, I don't have any good ideas at this point, this check can be very complex. :( The only thing I can think of is to postpone this optimization until after the lookup table. https://github.com/llvm/llvm-project/pull/95665