InstCombine
LLVM's big simplification pass, rewriting short instruction sequences in the IR into simpler equivalents using thousands of hand-written rules.
Think of it as a peephole optimizer that works on IR rather than machine code. x * 8 becomes x << 3, (a ^ b) ^ b becomes a, a comparison against itself becomes a constant. The pass drains a worklist until nothing changes, and it runs several times in the pipeline because other passes keep leaving fresh material behind. Over the years it has grown into one of the largest pieces of LLVM — tens of thousands of lines, nearly all of them a pattern someone once needed.
That many rules are hard to keep correct. In 2015 Nuno Lopes, David Menendez, Santosh Nagarakatte and John Regehr built Alive, which proves peephole rules with an SMT solver, and promptly found miscompiling rewrites in InstCombine. Its successor Alive2 now runs against LLVM's test suite and catches rules that make code wrong — usually because they forgot about poison values.