1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -simplifycfg < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 declare i32* @fn1(i32* returned)
8 define i32 @test1(i1 %B) {
11 ; CHECK-NEXT: br label [[FOR_COND_US:%.*]]
13 ; CHECK-NEXT: [[TMP0:%.*]] = xor i1 [[B:%.*]], true
14 ; CHECK-NEXT: call void @llvm.assume(i1 [[TMP0]])
15 ; CHECK-NEXT: br label [[FOR_COND_US]]
20 for.cond.us: ; preds = %for.cond.us, %entry
21 br i1 %B, label %for.cond4.preheader, label %for.cond.us
23 for.cond4.preheader: ; preds = %for.cond.us
24 br i1 %B, label %for.cond4.preheader.split.us, label %for.cond4
26 for.cond4.preheader.split.us: ; preds = %for.cond4.preheader
29 for.cond4: ; preds = %for.end, %for.cond4.preheader
30 %phi = phi i32* [ %call, %for.end ], [ undef, %for.cond4.preheader ]
31 %call = call i32* @fn1(i32* %phi)
34 for.cond5: ; preds = %for.cond5, %for.cond4
35 br i1 %B, label %for.cond5, label %for.end
37 for.end: ; preds = %for.cond5
38 %load = load i32, i32* %call, align 4