• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -slp-vectorizer -S < %s | FileCheck %s
3target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-pc-windows-msvc18.0.0"
5
6%struct.B = type { i64, i64 }
7
8define void @test1(%struct.B* %p) personality i32 (...)* @__CxxFrameHandler3 {
9; CHECK-LABEL: @test1(
10; CHECK-NEXT:  invoke.cont:
11; CHECK-NEXT:    [[GEP1:%.*]] = getelementptr inbounds [[STRUCT_B:%.*]], %struct.B* [[P:%.*]], i64 0, i32 0
12; CHECK-NEXT:    [[GEP2:%.*]] = getelementptr inbounds [[STRUCT_B]], %struct.B* [[P]], i64 0, i32 1
13; CHECK-NEXT:    [[TMP0:%.*]] = bitcast i64* [[GEP1]] to <2 x i64>*
14; CHECK-NEXT:    [[TMP1:%.*]] = load <2 x i64>, <2 x i64>* [[TMP0]], align 8
15; CHECK-NEXT:    [[TMP2:%.*]] = extractelement <2 x i64> [[TMP1]], i32 0
16; CHECK-NEXT:    [[TMP3:%.*]] = bitcast i64* [[GEP1]] to <2 x i64>*
17; CHECK-NEXT:    store <2 x i64> [[TMP1]], <2 x i64>* [[TMP3]], align 8
18; CHECK-NEXT:    invoke void @throw()
19; CHECK-NEXT:    to label [[UNREACHABLE:%.*]] unwind label [[CATCH_DISPATCH:%.*]]
20; CHECK:       catch.dispatch:
21; CHECK-NEXT:    [[CS:%.*]] = catchswitch within none [label %invoke.cont1] unwind label [[EHCLEANUP:%.*]]
22; CHECK:       invoke.cont1:
23; CHECK-NEXT:    [[CATCH:%.*]] = catchpad within [[CS]] [i8* null, i32 64, i8* null]
24; CHECK-NEXT:    invoke void @throw() [ "funclet"(token [[CATCH]]) ]
25; CHECK-NEXT:    to label [[UNREACHABLE]] unwind label [[EHCLEANUP]]
26; CHECK:       ehcleanup:
27; CHECK-NEXT:    [[PHI:%.*]] = phi i64 [ [[TMP2]], [[CATCH_DISPATCH]] ], [ 9, [[INVOKE_CONT1:%.*]] ]
28; CHECK-NEXT:    [[CLEANUP:%.*]] = cleanuppad within none []
29; CHECK-NEXT:    call void @release(i64 [[PHI]]) [ "funclet"(token [[CLEANUP]]) ]
30; CHECK-NEXT:    cleanupret from [[CLEANUP]] unwind to caller
31; CHECK:       unreachable:
32; CHECK-NEXT:    unreachable
33;
34invoke.cont:
35  %gep1 = getelementptr inbounds %struct.B, %struct.B* %p, i64 0, i32 0
36  %gep2 = getelementptr inbounds %struct.B, %struct.B* %p, i64 0, i32 1
37  %load1 = load i64, i64* %gep1, align 8
38  %load2 = load i64, i64* %gep2, align 8
39  store i64 %load1, i64* %gep1, align 8
40  store i64 %load2, i64* %gep2, align 8
41  invoke void @throw()
42  to label %unreachable unwind label %catch.dispatch
43
44catch.dispatch:                                   ; preds = %invoke.cont
45  %cs = catchswitch within none [label %invoke.cont1] unwind label %ehcleanup
46
47invoke.cont1:                                     ; preds = %catch.dispatch
48  %catch = catchpad within %cs [i8* null, i32 64, i8* null]
49  invoke void @throw() [ "funclet"(token %catch) ]
50  to label %unreachable unwind label %ehcleanup
51
52ehcleanup:                                        ; preds = %invoke.cont1, %catch.dispatch
53  %phi = phi i64 [ %load1, %catch.dispatch ], [ 9, %invoke.cont1 ]
54  %cleanup = cleanuppad within none []
55  call void @release(i64 %phi) [ "funclet"(token %cleanup) ]
56  cleanupret from %cleanup unwind to caller
57
58unreachable:                                      ; preds = %invoke.cont1, %invoke.cont
59  unreachable
60}
61
62declare i32 @__CxxFrameHandler3(...)
63
64declare void @throw()
65
66declare void @release(i64)
67