Created attachment 120595 [details]
hack patch
When replaying traces from Bug 92229 with R600_DEBUG=llvm specified a crash
will occur (on my system) in LLVMBuildInsertElement() because uninitialized
value in Index argument is passed. That value originates from
radeon_llvm_emit_prepare_cube_coords() function's coords[3] stack variable. At
that time,
opcode = TGSI_OPCODE_TEX
target = TGSI_TEXTURE_CUBE
so nothing ever sets coords[3], which is copied to the caller and eventually
finds it way to llvm.
Unfortunately I don't have any knowledge about that code, I hope somebody who
knows more can take a look. A hack patch is attached but it's most likely
wrong.