1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-linux-gnu" 5 6declare ptr @fn1(ptr returned) 7 8define i32 @test1(i1 %B) { 9; CHECK-LABEL: @test1( 10; CHECK-NEXT: entry: 11; CHECK-NEXT: br label [[FOR_COND_US:%.*]] 12; CHECK: 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]] 16; 17entry: 18 br label %for.cond.us 19 20for.cond.us: ; preds = %for.cond.us, %entry 21 br i1 %B, label %for.cond4.preheader, label %for.cond.us 22 23for.cond4.preheader: ; preds = %for.cond.us 24 br i1 %B, label %for.cond4.preheader.split.us, label %for.cond4 25 26for.cond4.preheader.split.us: ; preds = %for.cond4.preheader 27 unreachable 28 29for.cond4: ; preds = %for.end, %for.cond4.preheader 30 %phi = phi ptr [ %call, %for.end ], [ undef, %for.cond4.preheader ] 31 %call = call ptr @fn1(ptr %phi) 32 br label %for.cond5 33 34for.cond5: ; preds = %for.cond5, %for.cond4 35 br i1 %B, label %for.cond5, label %for.end 36 37for.end: ; preds = %for.cond5 38 %load = load i32, ptr %call, align 4 39 br label %for.cond4 40} 41