1#!/bin/bash
2#
3# This file was generated by create_test_cases.py.
4#
5# If one branch of an if ends in a jump, and control cannot
6# fall out the bottom of the other branch, and pull_out_jumps is
7# True, then the jump is lifted outside the if.
8# Verify that this lowering occurs during the same pass as the
9# lowering of other jumps by checking that extra temporary
10# variables aren't generated.
11../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(1, 0, 1, 0, 0)' <<EOF
12((declare (in) float aa) (declare (in) float ab) (declare (in) float b)
13 (declare (in) float c)
14 (declare (out) float d)
15 (function main
16  (signature void (parameters)
17   ((if (expression bool > (var_ref aa) (constant float (0.000000)))
18     ((if (expression bool > (var_ref ab) (constant float (0.000000)))
19       ((return))
20       ()))
21     ())
22    (loop () () () ()
23     ((if (expression bool > (var_ref b) (constant float (0.000000)))
24       ((if (expression bool > (var_ref c) (constant float (0.000000))) (break)
25         (continue)))
26       ((return)))))
27    (assign (x) (var_ref d) (constant float (1.000000)))))))
28EOF
29