 832c65c33b
			
		
	
	
		832c65c33b
		
	
	
	
	
		
			
			To ensure back branches always go to a header block, create a header block even for !testFirst loops. Then unify common code between the testFirst/!testFirst cases. Generate the header-block code first, so update golden files. Realize that certain infinite loops generate invalid SPIR-V, so put a TODO to instead abort code generation in such cases. Change-Id: I1e173c8f73daad186cfc666b7d72bd563ed7665d
		
			
				
	
	
		
			10 lines
		
	
	
		
			285 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			285 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 450
 | |
| layout(location=0) out highp int r;
 | |
| void main() {
 | |
|   int i;
 | |
|   // This infinite loop results in bad SPIR-V generated, since the merge block
 | |
|   // is dropped as unreachable.  It is still useful for testing the rest of the
 | |
|   // code generation.
 | |
|   for (i=0; ; i++) { r = i; }
 | |
| }
 |