This patch disables some of the passes at -O1. These passes have a significant impact on compilation time, so we only want them to be enabled starting from -O2.
I would suggest not checking the "Pass Arguments:" line at all here, since any diffs to this very long line will be very hard to read anyway. All the information should be contained in the lines below.
This seems like a weird interaction between flags. Maybe this should check if EnableScalarIRPasses was explicitly used? Or maybe we can just drop EnableScalarIRPasses entirely
You're right, that makes a lot more sense. I just updated the patch and added a RUN line in the test case to ensure the passes are run for -O1 when we explicitly provide the flags.