They were made unneccesary by the last commit.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
+*.opt_test
+*.expected
*.out
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains an unconditional break at the bottom of
-# it, it should not be lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 1)' <<EOF
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
-EOF
+++ /dev/null
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) break))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains a conditional break at the bottom of it,
-# it should not be lowered if it is in the then-clause.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 1)' <<EOF
-((declare (in) float b) (declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) (break)
- ())))))))
-EOF
+++ /dev/null
-((declare (in) float b) (declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) (break)
- ())))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains a conditional break at the bottom of it,
-# it should not be lowered if it is in the then-clause, even if
-# there are statements preceding the break.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 1)' <<EOF
-((declare (in) float b) (declare (out) float a) (declare (out) float c)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref c) (constant float (1.000000))) break)
- ())))))))
-EOF
+++ /dev/null
-((declare (in) float b) (declare (out) float a) (declare (out) float c)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref c) (constant float (1.000000))) break)
- ())))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains a conditional break at the bottom of it,
-# it should not be lowered if it is in the else-clause.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 1)' <<EOF
-((declare (in) float b) (declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) ()
- (break))))))))
-EOF
+++ /dev/null
-((declare (in) float b) (declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) ()
- (break))))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains a conditional break at the bottom of it,
-# it should not be lowered if it is in the else-clause, even if
-# there are statements preceding the break.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 1)' <<EOF
-((declare (in) float b) (declare (out) float a) (declare (out) float c)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) ()
- ((assign (x) (var_ref c) (constant float (1.000000))) break))))))))
-EOF
+++ /dev/null
-((declare (in) float b) (declare (out) float a) (declare (out) float c)
- (function main
- (signature void (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (if (expression bool > (var_ref b) (constant float (0.000000))) ()
- ((assign (x) (var_ref c) (constant float (1.000000))) break))))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# If a loop contains conditional breaks and continues, and
-# ends in an unconditional break, then the unconditional break
-# needs to be lowered, because it will no longer be at the end
-# of the loop after the final break is added.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 1, 1)' <<EOF
-((declare (in) float a) (declare (in) float ba) (declare (in) float bb)
- (declare (in) float ca)
- (declare (in) float cb)
- (function main
- (signature void (parameters)
- ((loop
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref ba) (constant float (0.000000)))
- ((if (expression bool > (var_ref bb) (constant float (0.000000)))
- (continue)
- ()))
- ())
- (if (expression bool > (var_ref ca) (constant float (0.000000)))
- ((if (expression bool > (var_ref cb) (constant float (0.000000)))
- (break)
- ()))
- ()))
- ())
- break))))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float ba) (declare (in) float bb)
- (declare (in) float ca)
- (declare (in) float cb)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool break_flag)
- (assign (x) (var_ref break_flag) (constant bool (0)))
- (loop
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref ba) (constant float (0.000000)))
- ((if (expression bool > (var_ref bb) (constant float (0.000000)))
- ((assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref execute_flag)
- ((if (expression bool > (var_ref ca) (constant float (0.000000)))
- ((if (expression bool > (var_ref cb) (constant float (0.000000)))
- ((assign (x) (var_ref break_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ()))
- ()))
- ())
- (if (var_ref execute_flag)
- ((assign (x) (var_ref break_flag) (constant bool (1))))
- ())
- (if (var_ref break_flag) (break) ())))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Normally a conditional break at the end of a loop isn't
-# lowered, however if the conditional break gets placed inside
-# an if(execute_flag) because of earlier lowering of continues,
-# then the break needs to be lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 1, 1)' <<EOF
-((declare (in) float aa) (declare (in) float ab) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((loop
- ((if (expression bool > (var_ref aa) (constant float (0.000000)))
- ((if (expression bool > (var_ref ab) (constant float (0.000000)))
- (continue)
- ()))
- ())
- (if (expression bool > (var_ref b) (constant float (0.000000))) (break)
- ())))))))
-EOF
+++ /dev/null
-((declare (in) float aa) (declare (in) float ab) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool break_flag)
- (assign (x) (var_ref break_flag) (constant bool (0)))
- (loop
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (if (expression bool > (var_ref aa) (constant float (0.000000)))
- ((if (expression bool > (var_ref ab) (constant float (0.000000)))
- ((assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref execute_flag)
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref break_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref break_flag) (break) ())))))))
+++ /dev/null
-#!/usr/bin/env 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
+++ /dev/null
-((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)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref aa) (constant float (0.000000)))
- ((if (expression bool > (var_ref ab) (constant float (0.000000)))
- ((assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref execute_flag)
- ((loop
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((if (expression bool > (var_ref c) (constant float (0.000000))) ()
- (continue)))
- ((assign (x) (var_ref return_flag) (constant bool (1)))))
- break))
- (if (var_ref return_flag) ()
- ((assign (x) (var_ref d) (constant float (1.000000))))))
- ())))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a void return at the end of a function is
-# eliminated.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 1, 0, 0)' <<EOF
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((assign (x) (var_ref a) (constant float (1.000000))) (return)))))
-EOF
+++ /dev/null
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((assign (x) (var_ref a) (constant float (1.000000)))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that lowering is not performed on a non-void return at
-# the end of subroutine.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
-((declare (out) float a)
- (function sub
- (signature float (parameters)
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (1.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a)
- (function sub
- (signature float (parameters)
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (1.000000)))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test lowering of returns when there is one nested inside a
-# complex structure of ifs, and one at the end of a function.
-# In this case, the latter return needs to be lowered because it
-# will not be at the end of the function once the final return
-# is inserted.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature float (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return (constant float (1.000000))))
- ()))
- ())
- (return (constant float (2.000000)))))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature float (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) float return_value)
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref return_value) (constant float (1.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref execute_flag)
- ((assign (x) (var_ref return_value) (constant float (2.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ())
- (return (var_ref return_value))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that returns are properly lowered when they occur in
-# both branches of an if-statement.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
-((declare (in) float a)
- (function sub
- (signature float (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((return (constant float (1.000000))))
- ((return (constant float (2.000000)))))))))
-EOF
+++ /dev/null
-((declare (in) float a)
- (function sub
- (signature float (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) float return_value)
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.000000)))
- ((assign (x) (var_ref return_value) (constant float (1.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ((assign (x) (var_ref return_value) (constant float (2.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0)))))
- (return (var_ref return_value))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that do_lower_jumps respects the lower_main_return
-# flag in deciding whether to lower returns in the main
-# function.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 0)' <<EOF
-((declare (in) float a) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that do_lower_jumps respects the lower_main_return
-# flag in deciding whether to lower returns in the main
-# function.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 1, 0, 0)' <<EOF
-((declare (in) float a) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float b)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that do_lower_jumps respects the lower_sub_return flag
-# in deciding whether to lower returns in subroutines.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 0)' <<EOF
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that do_lower_jumps respects the lower_sub_return flag
-# in deciding whether to lower returns in subroutines.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature void (parameters)
- ((if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((return))
- ()))
- ())))))
-EOF
+++ /dev/null
-((declare (in) float a) (declare (in) float b)
- (function sub
- (signature void (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref a) (constant float (0.000000)))
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())))))
+++ /dev/null
-#!/usr/bin/env 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
+++ /dev/null
-((declare (in) float aa) (declare (in) float ab) (declare (in) float b)
- (declare (in) float c)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (if (expression bool > (var_ref aa) (constant float (0.000000)))
- ((if (expression bool > (var_ref ab) (constant float (0.000000)))
- ((assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())
- (if (var_ref execute_flag)
- ((if (expression bool > (var_ref b) (constant float (0.000000)))
- ((if (expression bool > (var_ref c) (constant float (0.000000))) () ())
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0))))
- ()))
- ())))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a redundant continue-statement at the end of a
-# loop is removed.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 0)' <<EOF
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) continue))))))
-EOF
+++ /dev/null
-((declare (out) float a)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000)))))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a non-void return at the end of a loop is
-# properly lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 0)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (2.000000)))))
- (assign (x) (var_ref b) (constant float (3.000000)))
- (return (constant float (4.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (2.000000)))))
- (assign (x) (var_ref b) (constant float (3.000000)))
- (return (constant float (4.000000)))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a non-void return at the end of a loop is
-# properly lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 0)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (2.000000)))))
- (assign (x) (var_ref b) (constant float (3.000000)))
- (return (constant float (4.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) float return_value)
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (assign (x) (var_ref return_value) (constant float (2.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- break))
- (if (var_ref return_flag) ()
- ((assign (x) (var_ref b) (constant float (3.000000)))
- (assign (x) (var_ref return_value) (constant float (4.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0)))))
- (return (var_ref return_value))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a non-void return at the end of a loop is
-# properly lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 1, 0, 0, 1)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (return (constant float (2.000000)))))
- (assign (x) (var_ref b) (constant float (3.000000)))
- (return (constant float (4.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function sub
- (signature float (parameters)
- ((declare (temporary) bool execute_flag)
- (assign (x) (var_ref execute_flag) (constant bool (1)))
- (declare (temporary) float return_value)
- (declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (assign (x) (var_ref return_value) (constant float (2.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- break))
- (if (var_ref return_flag) ()
- ((assign (x) (var_ref b) (constant float (3.000000)))
- (assign (x) (var_ref return_value) (constant float (4.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- (assign (x) (var_ref execute_flag) (constant bool (0)))))
- (return (var_ref return_value))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a return of void at the end of a loop is properly
-# lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 0, 0, 0)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
- (assign (x) (var_ref b) (constant float (2.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
- (assign (x) (var_ref b) (constant float (2.000000)))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a return of void at the end of a loop is properly
-# lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 1, 0, 0)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
- (assign (x) (var_ref b) (constant float (2.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- break))
- (if (var_ref return_flag) ()
- ((assign (x) (var_ref b) (constant float (2.000000)))))))))
+++ /dev/null
-#!/usr/bin/env bash
-#
-# This file was generated by create_test_cases.py.
-#
-# Test that a return of void at the end of a loop is properly
-# lowered.
-../../glsl_test optpass --quiet --input-ir 'do_lower_jumps(0, 0, 1, 0, 1)' <<EOF
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((loop ((assign (x) (var_ref a) (constant float (1.000000))) (return)))
- (assign (x) (var_ref b) (constant float (2.000000)))))))
-EOF
+++ /dev/null
-((declare (out) float a) (declare (out) float b)
- (function main
- (signature void (parameters)
- ((declare (temporary) bool return_flag)
- (assign (x) (var_ref return_flag) (constant bool (0)))
- (loop
- ((assign (x) (var_ref a) (constant float (1.000000)))
- (assign (x) (var_ref return_flag) (constant bool (1)))
- break))
- (if (var_ref return_flag) ()
- ((assign (x) (var_ref b) (constant float (2.000000)))))))))