blob: c172eb2975c7dfd7710a14c5b5a99830a935d75e [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux"
define void @test(i32 signext %n, i1 %arg) {
; CHECK: Function Attrs: nofree norecurse nosync nounwind memory(none)
; CHECK-LABEL: define {{[^@]+}}@test
; CHECK-SAME: (i32 signext [[N:%.*]], i1 noundef [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: entry:
; CHECK-NEXT: br i1 [[ARG]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
; CHECK: if.then:
; CHECK-NEXT: ret void
; CHECK: if.end:
; CHECK-NEXT: br i1 [[ARG]], label [[IF_THEN2:%.*]], label [[IF_END4:%.*]]
; CHECK: if.then2:
; CHECK-NEXT: unreachable
; CHECK: if.end4:
; CHECK-NEXT: switch i32 [[N]], label [[IF_ELSE14:%.*]] [
; CHECK-NEXT: i32 0, label [[IF_THEN9:%.*]]
; CHECK-NEXT: i32 1, label [[IF_THEN12:%.*]]
; CHECK-NEXT: ]
; CHECK: if.then9:
; CHECK-NEXT: unreachable
; CHECK: if.then12:
; CHECK-NEXT: unreachable
; CHECK: if.else14:
; CHECK-NEXT: br label [[DO_BODY:%.*]]
; CHECK: do.body:
; CHECK-NEXT: [[SCALE_0:%.*]] = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, [[IF_ELSE14]] ], [ [[SCALE_0]], [[DO_BODY]] ]
; CHECK-NEXT: br i1 [[ARG]], label [[DO_BODY]], label [[IF_THEN33:%.*]]
; CHECK: if.then33:
; CHECK-NEXT: br i1 [[ARG]], label [[_ZN5BOOST4MATH4SIGNIGEEIRKT__EXIT30:%.*]], label [[COND_FALSE_I28:%.*]]
; CHECK: cond.false.i28:
; CHECK-NEXT: [[TMP0:%.*]] = bitcast ppc_fp128 [[SCALE_0]] to i128
; CHECK-NEXT: [[TOBOOL_I26:%.*]] = icmp slt i128 [[TMP0]], 0
; CHECK-NEXT: br label [[_ZN5BOOST4MATH4SIGNIGEEIRKT__EXIT30]]
; CHECK: _ZN5boost4math4signIgEEiRKT_.exit30:
; CHECK-NEXT: unreachable
;
entry:
br i1 %arg, label %if.then, label %if.end
if.then: ; preds = %entry
ret void
if.end: ; preds = %entry
br i1 %arg, label %if.then2, label %if.end4
if.then2: ; preds = %if.end
unreachable
if.end4: ; preds = %if.end
switch i32 %n, label %if.else14 [
i32 0, label %if.then9
i32 1, label %if.then12
]
if.then9: ; preds = %if.end4
unreachable
if.then12: ; preds = %if.end4
unreachable
if.else14: ; preds = %if.end4
br label %do.body
do.body: ; preds = %do.body, %if.else14
%scale.0 = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, %if.else14 ], [ %scale.0, %do.body ]
br i1 %arg, label %do.body, label %if.then33
if.then33: ; preds = %do.body
br i1 %arg, label %_ZN5boost4math4signIgEEiRKT_.exit30, label %cond.false.i28
cond.false.i28: ; preds = %if.then33
%0 = bitcast ppc_fp128 %scale.0 to i128
%tobool.i26 = icmp slt i128 %0, 0
br label %_ZN5boost4math4signIgEEiRKT_.exit30
_ZN5boost4math4signIgEEiRKT_.exit30: ; preds = %cond.false.i28, %if.then33
unreachable
}
;.
; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind memory(none) }
;.
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CGSCC: {{.*}}
; TUNIT: {{.*}}