File: cmpb-eq.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (53 lines) | stat: -rw-r--r-- 2,203 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; RUN: llc -march=hexagon < %s | FileCheck %s
; CHECK-NOT: cmpb.eq(r{{[0-9]+}},#-1)

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"
target triple = "hexagon"

%struct.wms_address_s = type { i32, i32, i32, i32, i8, [48 x i8] }

define zeroext i8 @qmi_wmsi_bin_to_addr(i8* %str, i8 zeroext %len, %struct.wms_address_s* %addr) nounwind optsize {
entry:
  %cmp = icmp eq i8* %str, null
  %cmp2 = icmp eq %struct.wms_address_s* %addr, null
  %or.cond = or i1 %cmp, %cmp2
  br i1 %or.cond, label %if.then12, label %if.then

if.then:                                          ; preds = %entry
  %dec = add i8 %len, -1
  %cmp3 = icmp ugt i8 %dec, 24
  %tobool27 = icmp eq i8 %dec, 0
  %or.cond31 = or i1 %cmp3, %tobool27
  br i1 %or.cond31, label %if.then12, label %for.body.lr.ph

for.body.lr.ph:                                   ; preds = %if.then
  %dec626 = add i8 %len, -2
  br label %for.body

for.body:                                         ; preds = %for.body.lr.ph, %if.end21
  %indvars.iv = phi i32 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %if.end21 ]
  %dec630 = phi i8 [ %dec626, %for.body.lr.ph ], [ %dec6, %if.end21 ]
  %str.pn = phi i8* [ %str, %for.body.lr.ph ], [ %str.addr.029, %if.end21 ]
  %str.addr.029 = getelementptr inbounds i8, i8* %str.pn, i32 1
  %0 = load i8, i8* %str.addr.029, align 1, !tbaa !0
  %cmp10 = icmp ugt i8 %0, -49
  br i1 %cmp10, label %if.then12.loopexit, label %if.end21

if.then12.loopexit:                               ; preds = %if.end21, %for.body
  br label %if.then12

if.then12:                                        ; preds = %if.then12.loopexit, %if.then, %entry
  ret i8 0

if.end21:                                         ; preds = %for.body
  %shr24 = lshr i8 %0, 4
  %arrayidx = getelementptr inbounds %struct.wms_address_s, %struct.wms_address_s* %addr, i32 0, i32 5, i32 %indvars.iv
  store i8 %shr24, i8* %arrayidx, align 1, !tbaa !0
  %dec6 = add i8 %dec630, -1
  %tobool = icmp eq i8 %dec630, 0
  %indvars.iv.next = add i32 %indvars.iv, 1
  br i1 %tobool, label %if.then12.loopexit, label %for.body
}

!0 = !{!"omnipotent char", !1}
!1 = !{!"Simple C/C++ TBAA"}