A superoptimizer tries to find the shortest sequence of instructions that is semantically equivalent to a given sequence of code. Since the search space is pretty large, brute force approaches don't work here.

You can find a good introduction to superoptimizers in Massalin's (known for the Synthesis self-optimizing OS) paper at https://dl.acm.org/doi/abs/10.1145/36177.36194