1 ; RUN: llc -march=hexagon < %s | FileCheck %s
5 ; CHECK-NOT: loop0(##.LBB
7 target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"
8 target triple = "hexagon"
10 define i32 @q6zip_uncompress(ptr %out_buf, ptr %out_buf_size, ptr %in_buf, i32 %in_buf_size, ptr nocapture %dict, i32 %dict_size) nounwind {
12 %incdec.ptr = getelementptr inbounds i8, ptr %in_buf, i32 4
13 %0 = load i32, ptr %in_buf, align 4, !tbaa !0
14 %1 = ptrtoint ptr %incdec.ptr to i32
15 %and.i = and i32 %1, 31
16 %sub.i = sub i32 %1, %and.i
17 %2 = inttoptr i32 %sub.i to ptr
18 %add.i = add i32 %in_buf_size, 31
19 %sub2.i = add i32 %add.i, %and.i
20 %div.i = lshr i32 %sub2.i, 5
21 %3 = tail call i32 @llvm.hexagon.A2.combine.ll(i32 32, i32 %div.i) nounwind
22 %4 = tail call i64 @llvm.hexagon.A4.combineir(i32 32, i32 %3) nounwind
23 tail call void asm sideeffect "l2fetch($0,$1)", "r,r,~{memory}"(ptr %2, i64 %4) nounwind, !srcloc !3
24 %5 = ptrtoint ptr %out_buf to i32
27 for.body.i: ; preds = %for.body.i, %entry
28 %i.02.i = phi i32 [ 0, %entry ], [ %inc.i, %for.body.i ]
29 %addr.addr.01.i = phi i32 [ %5, %entry ], [ %add.i14, %for.body.i ]
30 tail call void asm sideeffect "dczeroa($0)", "r"(i32 %addr.addr.01.i) nounwind, !srcloc !4
31 %add.i14 = add i32 %addr.addr.01.i, 32
32 %inc.i = add i32 %i.02.i, 1
33 %exitcond.i = icmp eq i32 %inc.i, 128
34 br i1 %exitcond.i, label %while.cond.preheader, label %for.body.i
36 while.cond.preheader: ; preds = %for.body.i
38 switch i32 %and, label %infloop.preheader [
39 i32 0, label %exit_inflate.split
40 i32 2, label %if.then.preheader
43 if.then.preheader: ; preds = %while.cond.preheader
46 infloop.preheader: ; preds = %while.cond.preheader
49 if.then: ; preds = %if.then.preheader, %if.then
50 tail call void @llvm.prefetch(ptr %incdec.ptr, i32 0, i32 3, i32 1)
53 exit_inflate.split: ; preds = %while.cond.preheader
56 infloop: ; preds = %infloop.preheader, %infloop
60 declare void @llvm.prefetch(ptr nocapture, i32, i32, i32) nounwind
62 declare i64 @llvm.hexagon.A4.combineir(i32, i32) nounwind readnone
64 declare i32 @llvm.hexagon.A2.combine.ll(i32, i32) nounwind readnone
67 !1 = !{!"omnipotent char", !2}
68 !2 = !{!"Simple C/C++ TBAA"}