intel_clc fails to build shaders with llvm 17 (due to deref casts)
MESA_SHADER_CACHE_DISABLE=true gdb --args /home/airlied/devel/mesa/mesa/build/src/intel/compiler/intel_clc -p dg2 --prefix gfx125_bvh_build_DFS_DFS -e DFS --in ../src/intel/vulkan/grl/gpu/bvh_build_DFS.cl -o src/intel/vulkan/grl/gfx125_bvh_build_DFS_DFS.h -- -cl-std=cl2.0 -D__OPENCL_VERSION__=200 -DMAX_HW_SIMD_WIDTH=16 -DMAX_WORKGROUP_SIZE=16 -I/home/airlied/devel/mesa/mesa/src/intel/vulkan/grl/gpu -I/home/airlied/devel/mesa/mesa/src/intel/vulkan/grl/include -include opencl-c.h
produces:
intel_clc: ../src/compiler/nir/nir_builder.h:1556: nir_build_deref_follower: Assertion `!"" "Invalid deref instruction type"' failed
#0 0x00007fffeceb0844 in __pthread_kill_implementation () from /lib64/libc.so.6
#1 0x00007fffece5fabe in raise () from /lib64/libc.so.6
#2 0x00007fffece4887f in abort () from /lib64/libc.so.6
#3 0x00007fffece4879b in __assert_fail_base.cold () from /lib64/libc.so.6
#4 0x00007fffece58147 in __assert_fail () from /lib64/libc.so.6
#5 0x00000000006e6482 in nir_build_deref_follower (b=0x7fffffffc8e0, parent=0x76692a8, leader=0x75596e8)
at ../src/compiler/nir/nir_builder.h:1556
#6 0x00000000006e67e6 in emit_load_store_deref (b=0x7fffffffc8e0, orig_instr=0x75597a8, parent=0x76692a8, deref_arr=0x7fffffffc838,
dest=0x7fffffffc708, src=0x73aa9b8) at ../src/compiler/nir/nir_lower_indirect_derefs.c:84
#7 0x00000000006e65d1 in emit_indirect_load_store_deref (b=0x7fffffffc8e0, orig_instr=0x75597a8, parent=0x76062a8,
deref_arr=0x7fffffffc830, start=0, end=1, dest=0x7fffffffc708, src=0x73aa9b8) at ../src/compiler/nir/nir_lower_indirect_derefs.c:43
#8 0x00000000006e6685 in emit_indirect_load_store_deref (b=0x7fffffffc8e0, orig_instr=0x75597a8, parent=0x76062a8,
deref_arr=0x7fffffffc830, start=0, end=3, dest=0x0, src=0x73aa9b8) at ../src/compiler/nir/nir_lower_indirect_derefs.c:55
#9 0x00000000006e67c6 in emit_load_store_deref (b=0x7fffffffc8e0, orig_instr=0x75597a8, parent=0x76062a8, deref_arr=0x7fffffffc830,
dest=0x0, src=0x73aa9b8) at ../src/compiler/nir/nir_lower_indirect_derefs.c:79
#10 0x00000000006e6d6f in lower_indirect_derefs_block (block=0x66ea480, b=0x7fffffffc8e0, modes=nir_var_function_temp, vars=0x0,
max_lower_array_len=16) at ../src/compiler/nir/nir_lower_indirect_derefs.c:172
#11 0x00000000006e6ea1 in lower_indirects_impl (impl=0x1f80540, modes=nir_var_function_temp, vars=0x0, max_lower_array_len=16)
at ../src/compiler/nir/nir_lower_indirect_derefs.c:197
#12 0x00000000006e6f4d in nir_lower_indirect_derefs (shader=0x7073dd0, modes=nir_var_function_temp, max_lower_array_len=16)
at ../src/compiler/nir/nir_lower_indirect_derefs.c:221
#13 0x000000000053f5b6 in brw_preprocess_nir (compiler=0x25cfa70, nir=0x7073dd0, opts=0x7fffffffcd80)
at ../src/intel/compiler/brw_nir.c:1024
#14 0x000000000042cad4 in brw_kernel_from_spirv (compiler=0x25cfa70, disk_cache=0x17f9720, kernel=0x7fffffffd110, log_data=0x0,
mem_ctx=0x145b3d0, spirv=0x2960930, spirv_size=658028, entrypoint_name=0x7fffffffe26f "DFS", error_str=0x7fffffffd108)
at ../src/intel/compiler/brw_kernel.c:356
#15 0x0000000000427c61 in main (argc=20, argv=0x7fffffffde88) at ../src/intel/compiler/intel_clc.c:532