1; RUN: opt -S -canonicalize-aliases < %s | FileCheck %s 2; RUN: opt -S -passes=canonicalize-aliases < %s | FileCheck %s 3; RUN: opt -prepare-for-thinlto -O0 -module-summary -o - < %s -enable-new-pm=0 | llvm-dis -o - | FileCheck %s 4; RUN: opt -passes='thinlto-pre-link<O0>,require<module-summary>' -o - < %s | llvm-dis -o - | FileCheck %s 5 6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 7target triple = "x86_64-unknown-linux-gnu" 8 9; CHECK-DAG: @analias = alias void (), void ()* @aliasee 10; CHECK-DAG: @anotheralias = alias void (), void ()* @aliasee 11; CHECK-DAG: define void @aliasee() 12 13@analias = alias void (), void ()* @anotheralias 14@anotheralias = alias void (), bitcast (void ()* @aliasee to void ()*) 15 16; Function Attrs: nounwind uwtable 17define void @aliasee() #0 { 18entry: 19 ret void 20} 21 22%struct.S1 = type { i32, i32, i32 } 23 24; CHECK-DAG: @S = global %struct.S1 { i32 31, i32 32, i32 33 } 25; CHECK-DAG: @Salias = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @S, i32 0, i32 1) 26; CHECK-DAG: @Salias2 = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @S, i32 0, i32 1) 27; CHECK-DAG: @Salias3 = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @S, i32 0, i32 1) 28 29@S = global %struct.S1 { i32 31, i32 32, i32 33 }, align 4 30@Salias = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @S, i32 0, i32 1) 31@Salias2 = alias i32, i32* @Salias 32@Salias3 = alias i32, i32* @Salias2 33 34; CHECK-DAG: @Salias4 = alias %struct.S1, %struct.S1* @S 35; CHECK-DAG: @Salias5 = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @S, i32 0, i32 1) 36 37@Salias4 = alias %struct.S1, %struct.S1* @S 38@Salias5 = alias i32, getelementptr inbounds (%struct.S1, %struct.S1* @Salias4, i32 0, i32 1) 39