brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 76bc89b Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-annotate-decl-cs  -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC4 5; FIXME: DOT should be replaced with 36 7define i32 @test-ashr(i32 %c) {8; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)9; CHECK-LABEL: define {{[^@]+}}@test-ashr10; CHECK-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {11; CHECK-NEXT:  chk65:12; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[C]], 6513; CHECK-NEXT:    br i1 [[CMP]], label [[RETURN:%.*]], label [[CHK0:%.*]]14; CHECK:       chk0:15; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[C]], 016; CHECK-NEXT:    br i1 [[CMP]], label [[RETURN]], label [[BB_IF:%.*]]17; CHECK:       bb_if:18; CHECK-NEXT:    [[ASHR_VAL:%.*]] = ashr exact i32 [[C]], 219; CHECK-NEXT:    [[CMP2:%.*]] = icmp sgt i32 [[ASHR_VAL]], 1520; CHECK-NEXT:    br i1 [[CMP2]], label [[BB_THEN:%.*]], label [[RETURN]]21; CHECK:       bb_then:22; CHECK-NEXT:    [[CMP3:%.*]] = icmp eq i32 [[ASHR_VAL]], 1623; CHECK-NEXT:    [[DOT:%.*]] = select i1 [[CMP3]], i32 3, i32 224; CHECK-NEXT:    br label [[RETURN]]25; CHECK:       return:26; CHECK-NEXT:    [[RETVAL:%.*]] = phi i32 [ 0, [[CHK65:%.*]] ], [ 1, [[CHK0]] ], [ [[DOT]], [[BB_THEN]] ], [ 4, [[BB_IF]] ]27; CHECK-NEXT:    ret i32 [[RETVAL]]28;29chk65:30  %cmp = icmp sgt i32 %c, 6531  br i1 %cmp, label %return, label %chk032 33chk0:34  %cmp1 = icmp slt i32 %c, 035  br i1 %cmp, label %return, label %bb_if36 37bb_if:38  %ashr.val = ashr exact i32 %c, 239  %cmp2 = icmp sgt i32 %ashr.val, 1540  br i1 %cmp2, label %bb_then, label %return41 42bb_then:43  %cmp3 = icmp eq i32 %ashr.val, 1644  %. = select i1 %cmp3, i32 3, i32 245  br label %return46 47return:48  %retval = phi i32 [0, %chk65], [1, %chk0], [%., %bb_then], [4, %bb_if]49  ret i32 %retval50}51;.52; CHECK: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }53;.54;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:55; CGSCC: {{.*}}56; TUNIT: {{.*}}57