The compiler uses a combination of bitset and jump table lowering strategies for switch statements, depending on the number of case labels and their distribution. It employs dynamic programming to optimize these strategies, considering factors such as register width and case values threshold.