Home | History | Annotate | Download | only in lower_jumps
      1 #!/bin/bash
      2 #
      3 # This file was generated by create_test_cases.py.
      4 #
      5 # Test lowering of returns when there is one nested inside a
      6 # complex structure of ifs, and one at the end of a function.
      7 # In this case, the latter return needs to be lowered because it
      8 # will not be at the end of the function once the final return
      9 # is inserted.
     10 ../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
     11 ((declare (in) float a) (declare (in) float b)
     12  (function sub
     13   (signature float (parameters)
     14    ((if (expression bool > (var_ref a) (constant float (0.000000)))
     15      ((if (expression bool > (var_ref b) (constant float (0.000000)))
     16        ((return (constant float (1.000000))))
     17        ()))
     18      ())
     19     (return (constant float (2.000000)))))))
     20 EOF
     21