https://github.com/efriedma-quic approved this pull request. LGTM Note that analyzeCompare has exactly one caller, which immediately passes the result to optimizeCompareInstr; maybe we should just merge them together. https://github.com/llvm/llvm-project/pull/141654