brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 3a90ecd Raw
56 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=loop-bound-split -S < %s | FileCheck %s3 4; LoopBoundSplit pass should fail to split this test's loop because the split5; condition is false in first iteration of the loop.6 7define i16 @main(i16 %qqq) {8; CHECK-LABEL: @main(9; CHECK-NEXT:  entry:10; CHECK-NEXT:    br label [[FOR_BODY:%.*]]11; CHECK:       for.body:12; CHECK-NEXT:    [[T0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[T8:%.*]], [[CONT19:%.*]] ]13; CHECK-NEXT:    [[T1:%.*]] = shl nuw nsw i16 [[T0]], 114; CHECK-NEXT:    [[T2:%.*]] = add i16 [[T1]], [[QQQ:%.*]]15; CHECK-NEXT:    [[DOTNOT9:%.*]] = icmp ult i16 [[T2]], [[QQQ]]16; CHECK-NEXT:    br i1 [[DOTNOT9]], label [[HANDLER_POINTER_OVERFLOW:%.*]], label [[CONT15_CRITEDGE:%.*]]17; CHECK:       handler.pointer_overflow:18; CHECK-NEXT:    call void @__ubsan_handle_pointer_overflow()19; CHECK-NEXT:    br label [[CONT19]]20; CHECK:       cont15.critedge:21; CHECK-NEXT:    br label [[CONT19]]22; CHECK:       cont19:23; CHECK-NEXT:    [[T8]] = add nuw nsw i16 [[T0]], 124; CHECK-NEXT:    [[EXITCOND_NOT:%.*]] = icmp eq i16 [[T8]], 325; CHECK-NEXT:    br i1 [[EXITCOND_NOT]], label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY]]26; CHECK:       for.cond.cleanup:27; CHECK-NEXT:    ret i16 028;29entry:30  br label %for.body31 32for.body:33  %t0 = phi i16 [ 0, %entry ], [ %t8, %cont19 ]34  %t1 = shl nuw nsw i16 %t0, 135  %t2 = add i16 %t1, %qqq36  %.not9 = icmp ult i16 %t2, %qqq37  br i1 %.not9, label %handler.pointer_overflow, label %cont15.critedge38 39handler.pointer_overflow:40  call void @__ubsan_handle_pointer_overflow()41  br label %cont1942 43cont15.critedge:44  br label %cont1945 46cont19:47  %t8 = add nuw nsw i16 %t0, 148  %exitcond.not = icmp eq i16 %t8, 349  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body50 51for.cond.cleanup:52  ret i16 053}54 55declare dso_local void @__ubsan_handle_pointer_overflow()56