File: PR30210.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 (40 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (12)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

declare ptr @fn1(ptr returned)

define i32 @test1(i1 %B) {
; CHECK-LABEL: @test1(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    br label [[FOR_COND_US:%.*]]
; CHECK:       for.cond.us:
; CHECK-NEXT:    [[TMP0:%.*]] = xor i1 [[B:%.*]], true
; CHECK-NEXT:    call void @llvm.assume(i1 [[TMP0]])
; CHECK-NEXT:    br label [[FOR_COND_US]]
;
entry:
  br label %for.cond.us

for.cond.us:                                      ; preds = %for.cond.us, %entry
  br i1 %B, label %for.cond4.preheader, label %for.cond.us

for.cond4.preheader:                              ; preds = %for.cond.us
  br i1 %B, label %for.cond4.preheader.split.us, label %for.cond4

for.cond4.preheader.split.us:                     ; preds = %for.cond4.preheader
  unreachable

for.cond4:                                        ; preds = %for.end, %for.cond4.preheader
  %phi = phi ptr [ %call, %for.end ], [ undef, %for.cond4.preheader ]
  %call = call ptr @fn1(ptr %phi)
  br label %for.cond5

for.cond5:                                        ; preds = %for.cond5, %for.cond4
  br i1 %B, label %for.cond5, label %for.end

for.end:                                          ; preds = %for.cond5
  %load = load i32, ptr %call, align 4
  br label %for.cond4
}