@Test
public void testReductionOpportunitiesOnEmptyForLoops() throws Exception {

  final TranslationUnit tu = ParseHelper.parse("#version 310 es\n"
      + "precision highp float;\n"
      + "int x = 0;\n"
      + "void main() {\n"
      + "  for(int i1 = 0;;) {\n"
      + "    for(int i2 = 0;;) {\n"
      + "      for(;;) {\n"
      + "        for(int i3 = 0;;) {\n"
      + "          x++;\n"
      + "          if (x > 10) break;\n"
      + "        }\n"
      + "        for(int i3 = 0;;) {\n"
      + "          x++;\n"
      + "          if (x > 10) break;\n"
      + "        }\n"
      + "        x++;\n"
      + "        if(x > 20) break;\n"
      + "      }\n"
      + "      x++;\n"
      + "      if(x > 30) break;\n"
      + "    }\n"
      + "    x++;\n"
      + "    if(x > 40) break;\n"
      + "  };\n"
      + "}\n");
  List<IReductionOpportunity> ops = ReductionOpportunities.getReductionOpportunities(
      MakeShaderJobFromFragmentShader.make(tu), new ReducerContext(true,
          ShadingLanguageVersion.GLSL_440,
          new RandomWrapper(0), new IdGenerator()), fileOps);
  ops.forEach(IReductionOpportunity::applyReduction);
}