brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · 4e77ef2 Raw
35 lines · plain
1target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"2target triple = "x86_64-unknown-linux-gnu"3 4@fptr = internal unnamed_addr global ptr @f2, align 85 6define dso_local i32 @foo(i32 %x) local_unnamed_addr {7entry:8  %0 = load ptr, ptr @fptr, align 89  %call = tail call i32 %0(i32 %x), !callees !010  ret i32 %call11}12 13define internal i32 @f2(i32 %x) {14entry:15  %tobool = icmp eq i32 %x, 016  br i1 %tobool, label %if.end, label %if.then17 18if.then:                                          ; preds = %entry19  store ptr @f1, ptr @fptr, align 820  %sub.i = add nsw i32 %x, -121  br label %if.end22 23if.end:                                           ; preds = %entry, %if.then24  %phi.call = phi i32 [ %sub.i, %if.then ], [ -1, %entry ]25  ret i32 %phi.call26}27 28define internal i32 @f1(i32 %x) {29entry:30  %sub = add nsw i32 %x, -131  ret i32 %sub32}33 34!0 = !{ptr @f1, ptr @f2}35