1 ;; Test an alias pointing to a GEP.
2 ; RUN: opt -module-summary %s -o %t1.bc
3 ; RUN: cp %t1.bc %t2.bc
4 ; RUN: llvm-lto2 run %t1.bc %t2.bc -r=%t1.bc,"??_7bad_array_new_length@stdext@@6B@",pl -r=%t1.bc,"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z",pl \
5 ; RUN: -r=%t1.bc,"?_Throw_bad_array_new_length@std@@YAXXZ",pl \
6 ; RUN: -r=%t2.bc,"??_7bad_array_new_length@stdext@@6B@", -r=%t2.bc,"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z", \
7 ; RUN: -r=%t2.bc,"?_Throw_bad_array_new_length@std@@YAXXZ", -o %t3 --save-temps
8 ; RUN: llvm-dis < %t3.2.1.promote.bc | FileCheck %s
10 ; CHECK: @anon = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr null, ptr @"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z"] }, comdat($"??_7bad_array_new_length@stdext@@6B@")
11 ; CHECK: @"??_7bad_array_new_length@stdext@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [4 x ptr] }, ptr @anon, i32 0, i32 0, i32 1){{$}}
12 ; CHECK: define available_externally dso_local noundef ptr @"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z"(ptr noundef nonnull %this) {
13 ; CHECK: define available_externally dso_local void @"?_Throw_bad_array_new_length@std@@YAXXZ"(ptr noundef nonnull %0) unnamed_addr {
15 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
16 target triple = "x86_64-pc-windows-msvc19.26.0"
18 $"??_7bad_array_new_length@stdext@@6B@" = comdat largest
19 $"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z" = comdat any
20 $"?_Throw_bad_array_new_length@std@@YAXXZ" = comdat any
22 @anon = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr null, ptr @"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z"] }, comdat($"??_7bad_array_new_length@stdext@@6B@")
24 @"??_7bad_array_new_length@stdext@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [4 x ptr] }, ptr @anon, i32 0, i32 0, i32 1)
26 define linkonce_odr dso_local noundef ptr @"??_Gbad_array_new_length@stdext@@UEAAPEAXI@Z"(ptr noundef nonnull %this) comdat {
31 define linkonce_odr dso_local void @"?_Throw_bad_array_new_length@std@@YAXXZ"(ptr noundef nonnull %0) unnamed_addr comdat {
33 store ptr @"??_7bad_array_new_length@stdext@@6B@", ptr %0, align 8