@@ -273,60 +273,6 @@ define double @atomic_max_double(double addrspace(4)* %addr, double noundef %val
273
273
ret double %old.cst
274
274
}
275
275
276
-
277
- define void @agg_count_distinct_bitmap_gpu (i64 addrspace (4 )* %agg , i64 noundef %val , i64 noundef %min_val , i64 noundef %base_dev_addr , i64 noundef %base_host_addr , i64 noundef %sub_bitmap_count , i64 noundef %bitmap_bytes ) {
278
- %bitmap_idx = sub nsw i64 %val , %min_val
279
- %bitmap_idx.i32 = trunc i64 %bitmap_idx to i32
280
- %byte_idx.i64 = lshr i64 %bitmap_idx , 3
281
- %byte_idx = trunc i64 %byte_idx.i64 to i32
282
- %word_idx = lshr i32 %byte_idx , 2
283
- %word_idx.i64 = zext i32 %word_idx to i64
284
- %byte_word_idx = and i32 %byte_idx , 3
285
- %host_addr = load i64 , i64 addrspace (4 )* %agg
286
- %sub_bm_m1 = sub i64 %sub_bitmap_count , 1
287
- %tid = call i64 @get_thread_index ()
288
- %sub_tid = and i64 %sub_bm_m1 , %tid
289
- %rhs = mul i64 %sub_tid , %bitmap_bytes
290
- %base_dev = add nsw i64 %base_dev_addr , %host_addr
291
- %lhs = sub nsw i64 %base_dev , %base_host_addr
292
- %bitmap_addr = add i64 %lhs , %rhs
293
- %bitmap = inttoptr i64 %bitmap_addr to i32 addrspace (4 )*
294
- switch i32 %byte_word_idx , label %.exit [
295
- i32 0 , label %.c0
296
- i32 1 , label %.c1
297
- i32 2 , label %.c2
298
- i32 3 , label %.c3
299
- ]
300
-
301
- .c0:
302
- %btwi0 = getelementptr inbounds i32 , i32 addrspace (4 )* %bitmap , i64 %word_idx.i64
303
- %res0 = and i32 %bitmap_idx.i32 , 7
304
- br label %.default
305
- .c1:
306
- %btwi1 = getelementptr inbounds i32 , i32 addrspace (4 )* %bitmap , i64 %word_idx.i64
307
- %btidx71 = and i32 %bitmap_idx.i32 , 7
308
- %res1 = or i32 %btidx71 , 8
309
- br label %.default
310
- .c2:
311
- %btwi2 = getelementptr inbounds i32 , i32 addrspace (4 )* %bitmap , i64 %word_idx.i64
312
- %btidx72 = and i32 %bitmap_idx.i32 , 7
313
- %res2 = or i32 %btidx72 , 16
314
- br label %.default
315
- .c3:
316
- %btwi3 = getelementptr inbounds i32 , i32 addrspace (4 )* %bitmap , i64 %word_idx.i64
317
- %btidx73 = and i32 %bitmap_idx.i32 , 7
318
- %res3 = or i32 %btidx73 , 24
319
- br label %.default
320
- .default:
321
- %res = phi i32 [ %res0 , %.c0 ], [ %res1 , %.c1 ], [ %res2 , %.c2 ], [ %res3 , %.c3 ]
322
- %arg0 = phi i32 addrspace (4 )* [ %btwi0 , %.c0 ], [ %btwi1 , %.c1 ], [ %btwi2 , %.c2 ], [ %btwi3 , %.c3 ]
323
- %arg1 = shl nuw i32 1 , %res
324
- tail call void @atomic_or (i32 addrspace (4 )* %arg0 , i32 noundef %arg1 )
325
- br label %.exit
326
- .exit:
327
- ret void
328
- }
329
-
330
276
define void @write_back_non_grouped_agg (i64 addrspace (4 )* %input_buffer , i64 addrspace (4 )* %output_buffer , i32 noundef %agg_idx ) {
331
277
%tid = call i64 @get_thread_index ()
332
278
%agg_idx.i64 = sext i32 %agg_idx to i64
0 commit comments