I Added a triple flag for x86-evenDirective test.
[oota-llvm.git] / test / CodeGen / Hexagon / cmpb-eq.ll
1 ; RUN: llc -march=hexagon < %s | FileCheck %s
2 ; CHECK-NOT: cmpb.eq(r{{[0-9]+}}, #-1)
3
4 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"
5 target triple = "hexagon"
6
7 %struct.wms_address_s = type { i32, i32, i32, i32, i8, [48 x i8] }
8
9 define zeroext i8 @qmi_wmsi_bin_to_addr(i8* %str, i8 zeroext %len, %struct.wms_address_s* %addr) nounwind optsize {
10 entry:
11   %cmp = icmp eq i8* %str, null
12   %cmp2 = icmp eq %struct.wms_address_s* %addr, null
13   %or.cond = or i1 %cmp, %cmp2
14   br i1 %or.cond, label %if.then12, label %if.then
15
16 if.then:                                          ; preds = %entry
17   %dec = add i8 %len, -1
18   %cmp3 = icmp ugt i8 %dec, 24
19   %tobool27 = icmp eq i8 %dec, 0
20   %or.cond31 = or i1 %cmp3, %tobool27
21   br i1 %or.cond31, label %if.then12, label %for.body.lr.ph
22
23 for.body.lr.ph:                                   ; preds = %if.then
24   %dec626 = add i8 %len, -2
25   br label %for.body
26
27 for.body:                                         ; preds = %for.body.lr.ph, %if.end21
28   %indvars.iv = phi i32 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %if.end21 ]
29   %dec630 = phi i8 [ %dec626, %for.body.lr.ph ], [ %dec6, %if.end21 ]
30   %str.pn = phi i8* [ %str, %for.body.lr.ph ], [ %str.addr.029, %if.end21 ]
31   %str.addr.029 = getelementptr inbounds i8, i8* %str.pn, i32 1
32   %0 = load i8, i8* %str.addr.029, align 1, !tbaa !0
33   %cmp10 = icmp ugt i8 %0, -49
34   br i1 %cmp10, label %if.then12.loopexit, label %if.end21
35
36 if.then12.loopexit:                               ; preds = %if.end21, %for.body
37   br label %if.then12
38
39 if.then12:                                        ; preds = %if.then12.loopexit, %if.then, %entry
40   ret i8 0
41
42 if.end21:                                         ; preds = %for.body
43   %shr24 = lshr i8 %0, 4
44   %arrayidx = getelementptr inbounds %struct.wms_address_s, %struct.wms_address_s* %addr, i32 0, i32 5, i32 %indvars.iv
45   store i8 %shr24, i8* %arrayidx, align 1, !tbaa !0
46   %dec6 = add i8 %dec630, -1
47   %tobool = icmp eq i8 %dec630, 0
48   %indvars.iv.next = add i32 %indvars.iv, 1
49   br i1 %tobool, label %if.then12.loopexit, label %for.body
50 }
51
52 !0 = !{!"omnipotent char", !1}
53 !1 = !{!"Simple C/C++ TBAA"}