File: preincprep-invoke.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (52 lines) | stat: -rw-r--r-- 2,047 bytes parent folder | download | duplicates (16)
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
; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

@.str1 = external unnamed_addr constant [1 x i8], align 1
@.str2 = external unnamed_addr constant [39 x i8], align 1

declare void @_ZN13CStdOutStreamlsEPKc()

declare void @_ZN13CStdOutStream5FlushEv()

declare i32 @__gxx_personality_v0(...)

define void @_Z11GetPasswordP13CStdOutStreamb(i1 %cond, i8 %arg1, i8* %arg2) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
  br label %for.cond.i.i

for.cond.i.i:                                     ; preds = %for.cond.i.i, %entry
  br i1 %cond, label %_ZN11CStringBaseIcEC2EPKc.exit.critedge, label %for.cond.i.i

_ZN11CStringBaseIcEC2EPKc.exit.critedge:          ; preds = %for.cond.i.i
  invoke void @_ZN13CStdOutStreamlsEPKc()
          to label %invoke.cont unwind label %lpad

invoke.cont:                                      ; preds = %_ZN11CStringBaseIcEC2EPKc.exit.critedge
  invoke void @_ZN13CStdOutStream5FlushEv()
          to label %invoke.cont4 unwind label %lpad

invoke.cont4:                                     ; preds = %invoke.cont
  %call7 = invoke i8* @getpass()
          to label %for.cond.i.i30 unwind label %lpad

; CHECK-LABEL: @_Z11GetPasswordP13CStdOutStreamb
; CHECK: addi {{[0-9]+}}, 3, -1

for.cond.i.i30:                                   ; preds = %for.cond.i.i30, %invoke.cont4
  %indvars.iv.i.i26 = phi i64 [ %indvars.iv.next.i.i29, %for.cond.i.i30 ], [ 0, %invoke.cont4 ]
  %arrayidx.i.i27 = getelementptr inbounds i8, i8* %call7, i64 %indvars.iv.i.i26
  %0 = load i8, i8* %arrayidx.i.i27, align 1
  %1 = add i8 %0, %arg1
  store i8 %1, i8* %arg2, align 1
  %indvars.iv.next.i.i29 = add nuw nsw i64 %indvars.iv.i.i26, 1
  br label %for.cond.i.i30

lpad:                                             ; preds = %invoke.cont4, %invoke.cont, %_ZN11CStringBaseIcEC2EPKc.exit.critedge
  %2 = landingpad { i8*, i32 }
          cleanup
  resume { i8*, i32 } undef
}

declare i8* @getpass()