File: lrev-existing-umin.ll

package info (click to toggle)
llvm-toolchain-3.9 1%3A3.9.1-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 441,060 kB
  • ctags: 428,777
  • sloc: cpp: 2,546,577; ansic: 538,318; asm: 119,677; objc: 103,316; python: 102,148; sh: 27,847; pascal: 5,626; ml: 5,510; perl: 5,293; lisp: 4,801; makefile: 2,177; xml: 686; cs: 362; php: 212; csh: 117
file content (36 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download | duplicates (11)
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
; RUN: opt -S -indvars < %s | FileCheck %s

define void @f(i32 %length.i.88, i32 %length.i, i8* %tmp12, i32 %tmp10, i8* %tmp8) {
; CHECK-LABEL: @f(
not_zero11.preheader:
  %tmp13 = icmp ugt i32 %length.i, %length.i.88
  %tmp14 = select i1 %tmp13, i32 %length.i.88, i32 %length.i
  %tmp15 = icmp sgt i32 %tmp14, 0
  br i1 %tmp15, label %not_zero11, label %not_zero11.postloop

not_zero11:
  %v_1 = phi i32 [ %tmp22, %not_zero11 ], [ 0, %not_zero11.preheader ]
  %tmp16 = zext i32 %v_1 to i64
  %tmp17 = getelementptr inbounds i8, i8* %tmp8, i64 %tmp16
  %tmp18 = load i8, i8* %tmp17, align 1
  %tmp19 = zext i8 %tmp18 to i32
  %tmp20 = or i32 %tmp19, %tmp10
  %tmp21 = trunc i32 %tmp20 to i8
  %addr22 = getelementptr inbounds i8, i8* %tmp12, i64 %tmp16
  store i8 %tmp21, i8* %addr22, align 1
  %tmp22 = add nuw nsw i32 %v_1, 1
  %tmp23 = icmp slt i32 %tmp22, %tmp14
  br i1 %tmp23, label %not_zero11, label %main.exit.selector

main.exit.selector:
; CHECK-LABEL: main.exit.selector:
; CHECK: %tmp24 = icmp slt i32 %tmp14, %length.i
  %tmp24 = icmp slt i32 %tmp22, %length.i
  br i1 %tmp24, label %not_zero11.postloop, label %leave

leave:
  ret void

not_zero11.postloop:
  ret void
}