| #!/bin/bash |
| # |
| # This file was generated by create_test_cases.py. |
| # |
| # If both branches of an if statement end in a return, and |
| # pull_out_jumps is True, then those returns should be lifted |
| # outside the if and then properly lowered. |
| # Verify that this lowering occurs during the same pass as the |
| # lowering of other returns by checking that extra temporary |
| # variables aren't generated. |
| ../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(1, 0, 1, 0, 0)' <<EOF |
| ((declare (in) float aa) (declare (in) float ab) (declare (in) float b) |
| (declare (in) float c) |
| (function main |
| (signature void (parameters) |
| ((if (expression bool > (var_ref aa) (constant float (0.000000))) |
| ((if (expression bool > (var_ref ab) (constant float (0.000000))) |
| ((return)) |
| ())) |
| ()) |
| (if (expression bool > (var_ref b) (constant float (0.000000))) |
| ((if (expression bool > (var_ref c) (constant float (0.000000))) |
| ((return)) |
| ((return)))) |
| ()))))) |
| EOF |