1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
3 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
4 target datalayout = "E-m:e-i64:64-n32:64"
5 target triple = "powerpc64le-unknown-linux"
7 define void @test(i32 signext %n, i1 %arg) {
8 ; CHECK: Function Attrs: nofree norecurse nosync nounwind memory(none)
9 ; CHECK-LABEL: define {{[^@]+}}@test
10 ; CHECK-SAME: (i32 signext [[N:%.*]], i1 noundef [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {
12 ; CHECK-NEXT: br i1 [[ARG]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: br i1 [[ARG]], label [[IF_THEN2:%.*]], label [[IF_END4:%.*]]
18 ; CHECK-NEXT: unreachable
20 ; CHECK-NEXT: switch i32 [[N]], label [[IF_ELSE14:%.*]] [
21 ; CHECK-NEXT: i32 0, label [[IF_THEN9:%.*]]
22 ; CHECK-NEXT: i32 1, label [[IF_THEN12:%.*]]
25 ; CHECK-NEXT: unreachable
27 ; CHECK-NEXT: unreachable
29 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
31 ; CHECK-NEXT: [[SCALE_0:%.*]] = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, [[IF_ELSE14]] ], [ [[SCALE_0]], [[DO_BODY]] ]
32 ; CHECK-NEXT: br i1 [[ARG]], label [[DO_BODY]], label [[IF_THEN33:%.*]]
34 ; CHECK-NEXT: br i1 [[ARG]], label [[_ZN5BOOST4MATH4SIGNIGEEIRKT__EXIT30:%.*]], label [[COND_FALSE_I28:%.*]]
35 ; CHECK: cond.false.i28:
36 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast ppc_fp128 [[SCALE_0]] to i128
37 ; CHECK-NEXT: [[TOBOOL_I26:%.*]] = icmp slt i128 [[TMP0]], 0
38 ; CHECK-NEXT: br label [[_ZN5BOOST4MATH4SIGNIGEEIRKT__EXIT30]]
39 ; CHECK: _ZN5boost4math4signIgEEiRKT_.exit30:
40 ; CHECK-NEXT: unreachable
44 br i1 %arg, label %if.then, label %if.end
46 if.then: ; preds = %entry
49 if.end: ; preds = %entry
50 br i1 %arg, label %if.then2, label %if.end4
52 if.then2: ; preds = %if.end
55 if.end4: ; preds = %if.end
56 switch i32 %n, label %if.else14 [
57 i32 0, label %if.then9
58 i32 1, label %if.then12
61 if.then9: ; preds = %if.end4
64 if.then12: ; preds = %if.end4
67 if.else14: ; preds = %if.end4
70 do.body: ; preds = %do.body, %if.else14
71 %scale.0 = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, %if.else14 ], [ %scale.0, %do.body ]
72 br i1 %arg, label %do.body, label %if.then33
74 if.then33: ; preds = %do.body
75 br i1 %arg, label %_ZN5boost4math4signIgEEiRKT_.exit30, label %cond.false.i28
77 cond.false.i28: ; preds = %if.then33
78 %0 = bitcast ppc_fp128 %scale.0 to i128
79 %tobool.i26 = icmp slt i128 %0, 0
80 br label %_ZN5boost4math4signIgEEiRKT_.exit30
82 _ZN5boost4math4signIgEEiRKT_.exit30: ; preds = %cond.false.i28, %if.then33
87 ; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind memory(none) }
89 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: