File: pr32610.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (61 lines) | stat: -rw-r--r-- 2,506 bytes parent folder | download | duplicates (10)
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
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=i386-apple-macosx10.13.0 -o - %s | FileCheck %s

target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"

@c = external local_unnamed_addr global i32, align 4
@b = external local_unnamed_addr global [1 x i32], align 4
@d = external local_unnamed_addr global i32, align 4

define void @pr32610(i32 %a0, i32 %a1) #0 {
; CHECK-LABEL: pr32610:
; CHECK:       ## %bb.0: ## %entry
; CHECK-NEXT:    pushl %ebp
; CHECK-NEXT:    movl %esp, %ebp
; CHECK-NEXT:    pushl %esi
; CHECK-NEXT:    movl 8(%ebp), %edx
; CHECK-NEXT:    movl L_b$non_lazy_ptr, %eax
; CHECK-NEXT:    movl (%eax), %eax
; CHECK-NEXT:    xorl %ecx, %ecx
; CHECK-NEXT:    cmpl %eax, %edx
; CHECK-NEXT:    sete %cl
; CHECK-NEXT:    xorl %esi, %esi
; CHECK-NEXT:    incl %esi
; CHECK-NEXT:    cmpl $0, 12(%ebp)
; CHECK-NEXT:    cmovel %esi, %ecx
; CHECK-NEXT:    cmpl %eax, %edx
; CHECK-NEXT:    cmovnel %esi, %ecx
; CHECK-NEXT:    movl L_c$non_lazy_ptr, %edx
; CHECK-NEXT:    movl %ecx, (%edx)
; CHECK-NEXT:    testl %eax, %eax
; CHECK-NEXT:    movl $2, %ecx
; CHECK-NEXT:    cmovnel %eax, %ecx
; CHECK-NEXT:    movl L_d$non_lazy_ptr, %eax
; CHECK-NEXT:    movl %ecx, (%eax)
; CHECK-NEXT:    popl %esi
; CHECK-NEXT:    popl %ebp
; CHECK-NEXT:    retl
entry:
  %0 = load i32, ptr getelementptr ([1 x i32], ptr @b, i32 0, i32 undef), align 4, !tbaa !1
  %cmp = icmp eq i32 %a0, %0
  %conv = zext i1 %cmp to i32
  %tobool1.i = icmp ne i32 %a1, 0
  %or.cond.i = and i1 %cmp, %tobool1.i
  %cond.i = select i1 %or.cond.i, i32 %conv, i32 1
  store i32 %cond.i, ptr @c, align 4, !tbaa !1
  %1 = load i32, ptr @b, align 4
  %tobool = icmp ne i32 %1, 0
  %2 = select i1 %tobool, i32 %1, i32 2
  store i32 %2, ptr @d, align 4, !tbaa !1
  ret void
}

attributes #0 = { norecurse nounwind optsize ssp "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = !{!"clang version 5.0.0 (trunk 301507) (llvm/trunk 301505)"}
!1 = !{!2, !2, i64 0}
!2 = !{!"int", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}