File: pr49451.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 (108 lines) | stat: -rw-r--r-- 3,909 bytes parent folder | download | duplicates (6)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64

@s_0 = external dso_local local_unnamed_addr global i16, align 2
@s_2 = external dso_local local_unnamed_addr global i16, align 2

define void @func_6(i8 %uc_8, i64 %uli_10) nounwind {
; X86-LABEL: func_6:
; X86:       # %bb.0: # %entry
; X86-NEXT:    pushl %ebx
; X86-NEXT:    pushl %esi
; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
; X86-NEXT:    movl $-1, %ecx
; X86-NEXT:    xorl %edx, %edx
; X86-NEXT:    xorl %ebx, %ebx
; X86-NEXT:    # implicit-def: $si
; X86-NEXT:    .p2align 4, 0x90
; X86-NEXT:  .LBB0_1: # %for.body612
; X86-NEXT:    # =>This Inner Loop Header: Depth=1
; X86-NEXT:    testb %dl, %dl
; X86-NEXT:    je .LBB0_2
; X86-NEXT:  # %bb.3: # %if.end1401
; X86-NEXT:    # in Loop: Header=BB0_1 Depth=1
; X86-NEXT:    testb %dl, %dl
; X86-NEXT:    addl %eax, %esi
; X86-NEXT:    movw %si, s_2
; X86-NEXT:    movw %bx, s_0
; X86-NEXT:    incl %ecx
; X86-NEXT:    incl %ebx
; X86-NEXT:    cmpw $73, %cx
; X86-NEXT:    jl .LBB0_1
; X86-NEXT:  # %bb.4: # %for.body1703
; X86-NEXT:  .LBB0_2: # %if.then671
;
; X64-LABEL: func_6:
; X64:       # %bb.0: # %entry
; X64-NEXT:    movl $23090, %eax # imm = 0x5A32
; X64-NEXT:    xorl %ecx, %ecx
; X64-NEXT:    # implicit-def: $dx
; X64-NEXT:    .p2align 4, 0x90
; X64-NEXT:  .LBB0_1: # %for.body612
; X64-NEXT:    # =>This Inner Loop Header: Depth=1
; X64-NEXT:    testb %cl, %cl
; X64-NEXT:    je .LBB0_2
; X64-NEXT:  # %bb.3: # %if.end1401
; X64-NEXT:    # in Loop: Header=BB0_1 Depth=1
; X64-NEXT:    testb %cl, %cl
; X64-NEXT:    addl %esi, %edx
; X64-NEXT:    movw %dx, s_2(%rip)
; X64-NEXT:    leal -23090(%rax), %edi
; X64-NEXT:    movw %di, s_0(%rip)
; X64-NEXT:    incq %rax
; X64-NEXT:    leal -23091(%rax), %edi
; X64-NEXT:    cmpw $73, %di
; X64-NEXT:    jl .LBB0_1
; X64-NEXT:  # %bb.4: # %for.body1703
; X64-NEXT:  .LBB0_2: # %if.then671
entry:
  %conv649 = zext i8 %uc_8 to i64
  %xor650 = xor i64 %conv649, 296357731680175678
  %i = trunc i64 %uli_10 to i16
  br label %for.body612

for.body612:                                      ; preds = %for.inc1677, %entry
  %i1 = phi i16 [ undef, %entry ], [ %conv1532, %for.inc1677 ]
  %i2 = phi i16 [ -1, %entry ], [ %add1679, %for.inc1677 ]
  br label %if.then635

if.then635:                                       ; preds = %for.body612
  %conv653 = sext i16 %i2 to i64
  %cmp654.not = icmp eq i64 %xor650, %conv653
  %conv653.op = xor i64 %conv653, 296357731680175678
  %tobool670.not = icmp eq i64 undef, 0
  br i1 %tobool670.not, label %if.end1401, label %if.then671

if.then671:                                       ; preds = %if.then635
  %cmp830 = icmp sgt i16 %i1, 21
  unreachable

if.end1401:                                       ; preds = %if.then635
  %conv1421 = sext i16 %i2 to i32
  %or1422 = or i32 %conv1421, undef
  br label %if.end1510

if.end1510:                                       ; preds = %if.end1401
  br i1 undef, label %cond.false1514, label %cond.end1528

cond.false1514:                                   ; preds = %if.end1510
  %conv1525 = sext i16 %i2 to i64
  %add1526 = add nsw i64 %conv1525, 23091
  br label %cond.end1528

cond.end1528:                                     ; preds = %cond.false1514, %if.end1510
  %cond1529 = phi i64 [ %add1526, %cond.false1514 ], [ undef, %if.end1510 ]
  %conv1532 = add i16 %i1, %i
  store i16 %conv1532, i16* @s_2, align 2
  br label %for.inc1677

for.inc1677:                                      ; preds = %cond.end1528
  %add1679 = add i16 %i2, 1
  store i16 %add1679, i16* @s_0, align 2
  %cmp610 = icmp slt i16 %add1679, 73
  br i1 %cmp610, label %for.body612, label %for.body1703

for.body1703:                                     ; preds = %for.inc1677
  unreachable
}