| #!/bin/bash |
| # |
| # This file was generated by create_test_cases.py. |
| # |
| # If one branch of an if ends in a jump, and control cannot |
| # fall out the bottom of the other branch, and pull_out_jumps is |
| # True, then the jump is lifted outside the if. |
| # Verify that this lowering occurs during the same pass as the |
| # lowering of other jumps 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) |
| (declare (out) float d) |
| (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)) |
| ())) |
| ()) |
| (loop () () () () |
| ((if (expression bool > (var_ref b) (constant float (0.000000))) |
| ((if (expression bool > (var_ref c) (constant float (0.000000))) (break) |
| (continue))) |
| ((return))))) |
| (assign (x) (var_ref d) (constant float (1.000000))))))) |
| EOF |