54 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; CHECK-NOT: cmpb.eq(r{{[0-9]+}},#-1)3 4target 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"5target triple = "hexagon"6 7%struct.wms_address_s = type { i32, i32, i32, i32, i8, [48 x i8] }8 9define zeroext i8 @qmi_wmsi_bin_to_addr(ptr %str, i8 zeroext %len, ptr %addr) nounwind optsize {10entry:11 %cmp = icmp eq ptr %str, null12 %cmp2 = icmp eq ptr %addr, null13 %or.cond = or i1 %cmp, %cmp214 br i1 %or.cond, label %if.then12, label %if.then15 16if.then: ; preds = %entry17 %dec = add i8 %len, -118 %cmp3 = icmp ugt i8 %dec, 2419 %tobool27 = icmp eq i8 %dec, 020 %or.cond31 = or i1 %cmp3, %tobool2721 br i1 %or.cond31, label %if.then12, label %for.body.lr.ph22 23for.body.lr.ph: ; preds = %if.then24 %dec626 = add i8 %len, -225 br label %for.body26 27for.body: ; preds = %for.body.lr.ph, %if.end2128 %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 ptr [ %str, %for.body.lr.ph ], [ %str.addr.029, %if.end21 ]31 %str.addr.029 = getelementptr inbounds i8, ptr %str.pn, i32 132 %0 = load i8, ptr %str.addr.029, align 1, !tbaa !033 %cmp10 = icmp ugt i8 %0, -4934 br i1 %cmp10, label %if.then12.loopexit, label %if.end2135 36if.then12.loopexit: ; preds = %if.end21, %for.body37 br label %if.then1238 39if.then12: ; preds = %if.then12.loopexit, %if.then, %entry40 ret i8 041 42if.end21: ; preds = %for.body43 %shr24 = lshr i8 %0, 444 %arrayidx = getelementptr inbounds %struct.wms_address_s, ptr %addr, i32 0, i32 5, i32 %indvars.iv45 store i8 %shr24, ptr %arrayidx, align 1, !tbaa !046 %dec6 = add i8 %dec630, -147 %tobool = icmp eq i8 %dec630, 048 %indvars.iv.next = add i32 %indvars.iv, 149 br i1 %tobool, label %if.then12.loopexit, label %for.body50}51 52!0 = !{!"omnipotent char", !1}53!1 = !{!"Simple C/C++ TBAA"}54