glsl/tests: remove generated tests from the repo

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>
This commit is contained in:
Connor Abbott
2014-05-27 21:23:05 -04:00
committed by Kenneth Graunke
parent a1d8322fbb
commit fc7e7cfabc
49 changed files with 2 additions and 696 deletions

View File

@@ -1 +1,3 @@
*.opt_test
*.expected
*.out

View File

@@ -1,12 +0,0 @@
#!/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

View File

@@ -1,4 +0,0 @@
((declare (out) float a)
(function main
(signature void (parameters)
((loop ((assign (x) (var_ref a) (constant float (1.000000))) break))))))

View File

@@ -1,15 +0,0 @@
#!/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

View File

@@ -1,7 +0,0 @@
((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)
())))))))

View File

@@ -1,17 +0,0 @@
#!/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

View File

@@ -1,8 +0,0 @@
((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)
())))))))

View File

@@ -1,15 +0,0 @@
#!/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

View File

@@ -1,7 +0,0 @@
((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))))))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,7 +0,0 @@
((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))))))))

View File

@@ -1,29 +0,0 @@
#!/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

View File

@@ -1,29 +0,0 @@
((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) ())))))))

View File

@@ -1,21 +0,0 @@
#!/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

View File

@@ -1,20 +0,0 @@
((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) ())))))))

View File

@@ -1,28 +0,0 @@
#!/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

View File

@@ -1,25 +0,0 @@
((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))))))
())))))

View File

@@ -1,12 +0,0 @@
#!/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

View File

@@ -1,4 +0,0 @@
((declare (out) float a)
(function main
(signature void (parameters)
((assign (x) (var_ref a) (constant float (1.000000)))))))

View File

@@ -1,13 +0,0 @@
#!/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

View File

@@ -1,5 +0,0 @@
((declare (out) float a)
(function sub
(signature float (parameters)
((assign (x) (var_ref a) (constant float (1.000000)))
(return (constant float (1.000000)))))))

View File

@@ -1,20 +0,0 @@
#!/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

View File

@@ -1,21 +0,0 @@
((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))))))

View File

@@ -1,14 +0,0 @@
#!/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

View File

@@ -1,16 +0,0 @@
((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))))))

View File

@@ -1,17 +0,0 @@
#!/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

View File

@@ -1,8 +0,0 @@
((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))
()))
())))))

View File

@@ -1,17 +0,0 @@
#!/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

View File

@@ -1,13 +0,0 @@
((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))))
()))
())))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,8 +0,0 @@
((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))
()))
())))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,13 +0,0 @@
((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))))
()))
())))))

View File

@@ -1,26 +0,0 @@
#!/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

View File

@@ -1,21 +0,0 @@
((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))))
()))
())))))

View File

@@ -1,12 +0,0 @@
#!/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

View File

@@ -1,4 +0,0 @@
((declare (out) float a)
(function main
(signature void (parameters)
((loop ((assign (x) (var_ref a) (constant float (1.000000)))))))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,8 +0,0 @@
((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)))))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,19 +0,0 @@
((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))))))

View File

@@ -1,16 +0,0 @@
#!/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

View File

@@ -1,19 +0,0 @@
((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))))))

View File

@@ -1,13 +0,0 @@
#!/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

View File

@@ -1,5 +0,0 @@
((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)))))))

View File

@@ -1,13 +0,0 @@
#!/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

View File

@@ -1,11 +0,0 @@
((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)))))))))

View File

@@ -1,13 +0,0 @@
#!/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

View File

@@ -1,11 +0,0 @@
((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)))))))))