brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · a2fd239 Raw
61 lines · plain
1; RUN: opt -passes="ipsccp<func-spec>" -force-specialization -funcspec-max-iters=2 -funcspec-max-clones=1 -funcspec-for-literal-constant=true -S < %s | FileCheck %s2 3declare hidden i1 @compare(ptr) align 24declare hidden { i8, ptr } @getType(ptr) align 25 6; CHECK-LABEL: @foo7; CHECK-LABEL: @foo.specialized.18; CHECK-LABEL: @foo.specialized.29 10define internal void @foo(ptr %TLI, ptr %DL, ptr %Ty, ptr %ValueVTs, ptr %Offsets, i64 %StartingOffset, i1 %arg) {11entry:12  %VT = alloca i64, align 813  br i1 false, label %if.then, label %if.end414 15if.then:                                          ; preds = %entry16  ret void17 18if.end4:                                          ; preds = %entry19  %cmp = call zeroext i1 @compare(ptr undef)20  br i1 %cmp, label %for.body, label %for.cond1621 22for.body:                                         ; preds = %if.end423  %add13 = add i64 %StartingOffset, undef24  call void @foo(ptr %TLI, ptr %DL, ptr undef, ptr %ValueVTs, ptr %Offsets, i64 %add13, i1 %arg)25  unreachable26 27for.cond16:                                       ; preds = %for.cond34, %if.end428  %call27 = call { i8, ptr } @getType(ptr %VT)29  br label %for.cond3430 31for.cond34:                                       ; preds = %for.body37, %for.cond1632  br i1 %arg, label %for.body37, label %for.cond1633 34for.body37:                                       ; preds = %for.cond3435  %tobool39 = icmp ne ptr %Offsets, null36  br label %for.cond3437}38 39define hidden { ptr, i32 } @bar(ptr %this, i1 %arg) {40entry:41  %Offsets = alloca i64, align 842  %cmp26 = call zeroext i1 @compare(ptr undef)43  br i1 %cmp26, label %for.body28, label %for.cond.cleanup2744 45for.cond.cleanup27:                               ; preds = %entry46  ret { ptr, i32 } undef47 48for.body28:                                       ; preds = %entry49  %call33 = call zeroext i1 @compare(ptr undef)50  br i1 %call33, label %if.then34, label %if.end10651 52if.then34:                                        ; preds = %for.body2853  call void @foo(ptr %this, ptr undef, ptr undef, ptr undef, ptr null, i64 0, i1 %arg)54  unreachable55 56if.end106:                                        ; preds = %for.body2857  call void @foo(ptr %this, ptr undef, ptr undef, ptr undef, ptr %Offsets, i64 0, i1 %arg)58  unreachable59}60 61