1- ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
21; RUN: opt -S -passes=loop-vectorize < %s | FileCheck %s
32target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
43target triple = "i686-pc-windows-msvc18.0.0"
54
65define void @test1 () #0 personality ptr @__CxxFrameHandler3 {
7- ; CHECK-LABEL: define void @test1(
8- ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] personality ptr @__CxxFrameHandler3 {
9- ; CHECK-NEXT: [[ENTRY:.*:]]
10- ; CHECK-NEXT: invoke void @_CxxThrowException(ptr null, ptr null)
11- ; CHECK-NEXT: to label %[[UNREACHABLE:.*]] unwind label %[[CATCH_DISPATCH:.*]]
12- ; CHECK: [[CATCH_DISPATCH]]:
13- ; CHECK-NEXT: [[TMP0:%.*]] = catchswitch within none [label %catch] unwind to caller
14- ; CHECK: [[CATCH:.*]]:
15- ; CHECK-NEXT: [[TMP1:%.*]] = catchpad within [[TMP0]] [ptr null, i32 64, ptr null]
16- ; CHECK-NEXT: br label %[[FOR_BODY:.*]]
17- ; CHECK: [[FOR_COND_CLEANUP:.*]]:
18- ; CHECK-NEXT: catchret from [[TMP1]] to label %[[TRY_CONT:.*]]
19- ; CHECK: [[FOR_BODY]]:
20- ; CHECK-NEXT: [[I_07:%.*]] = phi i32 [ 0, %[[CATCH]] ], [ [[INC:%.*]], %[[FOR_BODY]] ]
21- ; CHECK-NEXT: [[CALL:%.*]] = call double @floor(double 1.000000e+00) #[[ATTR1:[0-9]+]] [ "funclet"(token [[TMP1]]) ]
22- ; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[I_07]], 1
23- ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INC]], 1024
24- ; CHECK-NEXT: br i1 [[EXITCOND]], label %[[FOR_COND_CLEANUP]], label %[[FOR_BODY]]
25- ; CHECK: [[TRY_CONT]]:
26- ; CHECK-NEXT: ret void
27- ; CHECK: [[UNREACHABLE]]:
28- ; CHECK-NEXT: unreachable
29- ;
306entry:
317 invoke void @_CxxThrowException (ptr null , ptr null )
32- to label %unreachable unwind label %catch.dispatch
8+ to label %unreachable unwind label %catch.dispatch
339
3410catch.dispatch: ; preds = %entry
3511 %0 = catchswitch within none [label %catch ] unwind to caller
@@ -43,7 +19,8 @@ for.cond.cleanup: ; preds = %for.body
4319
4420for.body: ; preds = %for.body, %catch
4521 %i.07 = phi i32 [ 0 , %catch ], [ %inc , %for.body ]
46- %call = call double @floor (double 1 .0 ) #1 [ "funclet" (token %1 ) ]
22+ %tofp = uitofp i32 %i.07 to double
23+ %call = call double @floor (double %tofp ) #1 [ "funclet" (token %1 ) ]
4724 %inc = add nuw nsw i32 %i.07 , 1
4825 %exitcond = icmp eq i32 %inc , 1024
4926 br i1 %exitcond , label %for.cond.cleanup , label %for.body
@@ -55,6 +32,9 @@ unreachable: ; preds = %entry
5532 unreachable
5633}
5734
35+ ; CHECK-LABEL: define void @test1(
36+ ; CHECK: %[[cpad:.*]] = catchpad within {{.*}} [ptr null, i32 64, ptr null]
37+ ; CHECK: call <16 x double> @llvm.floor.v16f64(<16 x double> {{.*}}) [ "funclet"(token %[[cpad]]) ]
5838
5939declare x86_stdcallcc void @_CxxThrowException (ptr , ptr )
6040
0 commit comments