brintos

brintos / llvm-project-archived public Read only

0
0
Text · 968 B · 7f7f809 Raw
38 lines · plain
1; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -S -mtriple=x86_64 < %s | FileCheck %s2 3; Test that an invalid CFG is not created by splitIndirectCriticalEdges4; transformation when the 'target' block is a loop to itself.5 6; CHECK: .split:7; CHECK: br label %while.body.clone8; CHECK: if.else1:9; CHECK: indirectbr10; CHECK: while.body.clone:11; CHECK: br label %.split12 13define void @test(i1 %c) {14entry:15  br label %if.else16 17if.else:18  br i1 %c, label %while.body, label %preheader19 20preheader:21  br label %if.else122 23if.then:24  unreachable25 26while.body:27  %dest.sroa = phi i32 [ %1, %while.body ], [ undef, %if.else1 ], [ undef, %if.else ]28  %0 = inttoptr i32 %dest.sroa to ptr29  %incdec.ptr = getelementptr inbounds i8, ptr %0, i32 -130  %1 = ptrtoint ptr %incdec.ptr to i3231  store i8 undef, ptr %incdec.ptr, align 132  br label %while.body33 34if.else1:35  indirectbr ptr undef, [label %if.then, label %while.body, label %if.else, label %if.else1]36}37 38