llm: use upstream scalar index fix

This commit is contained in:
2026-08-03 22:15:06 +00:00
parent 22bc5b40b2
commit c36ccead6e
-1
View File
@@ -162,7 +162,6 @@ class CStyleLanguage(Renderer):
def render_index(self, x:UOp, buf:UOp, idx:UOp):
if buf.addrspace == AddrSpace.ALU:
if buf.max_numel() == 1: return self[buf]
# this is lane access in C
if idx.op is not Ops.CONST: return f"({self[buf]})[{self[idx]}]"
return self[buf]+(f"[{idx.val}]" if buf.max_numel() > self.gep_arr_threshold else f".{'xyzwabcd'[idx.val]}")