1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc"
6 %class.A = type { i32 (...)** }
8 @0 = constant [1 x i8*] zeroinitializer
10 @vtbl = alias i8*, getelementptr inbounds ([1 x i8*], [1 x i8*]* @0, i32 0, i32 0)
12 define i32 (%class.A*)* @test() {
15 br i1 undef, label %for.body, label %for.end
17 for.body: ; preds = %for.body, %entry
18 br i1 undef, label %for.body, label %for.end
20 for.end: ; preds = %for.body, %entry
21 %A = phi i32 (%class.A*)** [ bitcast (i8** @vtbl to i32 (%class.A*)**), %for.body ], [ null, %entry ]
22 %B = load i32 (%class.A*)*, i32 (%class.A*)** %A
23 ret i32 (%class.A*)* %B