1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=slp-vectorizer < %s | FileCheck %s
3 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
4 target triple = "i686-pc-windows-msvc18.0.0"
6 define void @test1(ptr %a, ptr %b, ptr %c) #0 personality ptr @__CxxFrameHandler3 {
9 ; CHECK-NEXT: invoke void @_CxxThrowException(ptr null, ptr null)
10 ; CHECK-NEXT: to label [[UNREACHABLE:%.*]] unwind label [[CATCH_DISPATCH:%.*]]
11 ; CHECK: catch.dispatch:
12 ; CHECK-NEXT: [[TMP0:%.*]] = catchswitch within none [label %catch] unwind to caller
14 ; CHECK-NEXT: [[TMP1:%.*]] = catchpad within [[TMP0]] [ptr null, i32 64, ptr null]
15 ; CHECK-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr [[A:%.*]], align 8
16 ; CHECK-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr [[B:%.*]], align 8
17 ; CHECK-NEXT: [[TMP6:%.*]] = fmul <2 x double> [[TMP3]], [[TMP5]]
18 ; CHECK-NEXT: [[TMP7:%.*]] = call <2 x double> @llvm.floor.v2f64(<2 x double> [[TMP6]]) [ "funclet"(token [[TMP1]]) ]
19 ; CHECK-NEXT: store <2 x double> [[TMP7]], ptr [[C:%.*]], align 8
20 ; CHECK-NEXT: catchret from [[TMP1]] to label [[TRY_CONT:%.*]]
22 ; CHECK-NEXT: ret void
24 ; CHECK-NEXT: unreachable
27 invoke void @_CxxThrowException(ptr null, ptr null)
28 to label %unreachable unwind label %catch.dispatch
30 catch.dispatch: ; preds = %entry
31 %0 = catchswitch within none [label %catch] unwind to caller
33 catch: ; preds = %catch.dispatch
34 %1 = catchpad within %0 [ptr null, i32 64, ptr null]
35 %i0 = load double, ptr %a, align 8
36 %i1 = load double, ptr %b, align 8
37 %mul = fmul double %i0, %i1
38 %call = tail call double @floor(double %mul) #1 [ "funclet"(token %1) ]
39 %arrayidx3 = getelementptr inbounds double, ptr %a, i64 1
40 %i3 = load double, ptr %arrayidx3, align 8
41 %arrayidx4 = getelementptr inbounds double, ptr %b, i64 1
42 %i4 = load double, ptr %arrayidx4, align 8
43 %mul5 = fmul double %i3, %i4
44 %call5 = tail call double @floor(double %mul5) #1 [ "funclet"(token %1) ]
45 store double %call, ptr %c, align 8
46 %arrayidx5 = getelementptr inbounds double, ptr %c, i64 1
47 store double %call5, ptr %arrayidx5, align 8
48 catchret from %1 to label %try.cont
50 try.cont: ; preds = %for.cond.cleanup
53 unreachable: ; preds = %entry
57 declare x86_stdcallcc void @_CxxThrowException(ptr, ptr)
59 declare i32 @__CxxFrameHandler3(...)
61 declare double @floor(double) #1
63 attributes #0 = { "target-features"="+sse2" }
64 attributes #1 = { nounwind readnone willreturn }