glsl: always call do_lower_jumps() after loop unrolling
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 3 Apr 2018 01:38:13 +0000 (11:38 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 3 Apr 2018 22:40:16 +0000 (08:40 +1000)
commitb42633db8e3711e54a5bd10495b1436b8e362801
treed458d50336e52b6eb2beccb6d1c8524f060d2cef
parenta58fdc61e9f10d91b618c7719a51ea2465a22186
glsl: always call do_lower_jumps() after loop unrolling

This fixes a bug in radeonsi where LLVM cannot handle the case where
a break exists but its not the last instruction in the block.

LLVM would fail with:
Terminator found in the middle of a basic block!
LLVM ERROR: Broken function found, compilation aborted!

Fixes: 96fe8834f539 "glsl_to_tgsi: do fewer optimizations with GLSLOptimizeConservatively"
Reviewed-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105317
src/compiler/glsl/glsl_parser_extras.cpp