1 ; RUN: opt -basicaa -gvn -S < %s | FileCheck %s
2 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
3 target triple = "i686-pc-windows-msvc"
5 %eh.ThrowInfo = type { i32, i8*, i8*, i8* }
6 %struct.A = type { i32* }
8 @"_TI1?AUA@@" = external constant %eh.ThrowInfo
10 define i8 @f() personality i32 (...)* @__CxxFrameHandler3 {
16 invoke void @_CxxThrowException(i8* %b, %eh.ThrowInfo* nonnull @"_TI1?AUA@@")
17 to label %unreachable unwind label %catch.dispatch
19 catch.dispatch: ; preds = %entry
20 %catchpad = catchpad [i8* null, i32 64, i8* null]
21 to label %catch unwind label %catchendblock
23 catch: ; preds = %catch.dispatch
25 catchret %catchpad to label %try.cont
27 try.cont: ; preds = %catch
28 %load_b = load i8, i8* %b
29 %load_c = load i8, i8* %c
30 %add = add i8 %load_b, %load_c
33 catchendblock: ; preds = %catch.dispatch
34 catchendpad unwind to caller
36 unreachable: ; preds = %entry
39 ; CHECK-LABEL: define i8 @f(
40 ; CHECK: %[[load_b:.*]] = load i8, i8* %b
41 ; CHECK-NEXT: %[[load_c:.*]] = load i8, i8* %c
42 ; CHECK-NEXT: %[[add:.*]] = add i8 %[[load_b]], %[[load_c]]
43 ; CHECK-NEXT: ret i8 %[[add]]
45 declare i32 @__CxxFrameHandler3(...)
47 declare x86_stdcallcc void @_CxxThrowException(i8*, %eh.ThrowInfo*)