1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes='sroa<preserve-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-PRESERVE-CFG
3 ; RUN: opt < %s -passes='sroa<modify-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-MODIFY-CFG
4 target datalayout = "E-m:e-i64:64-n32:64"
5 target triple = "powerpc64-unknown-linux-gnu"
7 %struct.ld2 = type { [2 x ppc_fp128] }
8 declare void @bar(ptr, [2 x i128])
10 define void @foo(ptr %v) #0 {
13 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast ppc_fp128 0xM403B0000000000000000000000000000 to i128
14 ; CHECK-NEXT: [[DOTFCA_0_INSERT:%.*]] = insertvalue [2 x i128] poison, i128 [[TMP0]], 0
15 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast ppc_fp128 0xM4093B400000000000000000000000000 to i128
16 ; CHECK-NEXT: [[DOTFCA_1_INSERT:%.*]] = insertvalue [2 x i128] [[DOTFCA_0_INSERT]], i128 [[TMP1]], 1
17 ; CHECK-NEXT: call void @bar(ptr [[V:%.*]], [2 x i128] [[DOTFCA_1_INSERT]])
18 ; CHECK-NEXT: ret void
21 %v.addr = alloca ptr, align 8
22 %z = alloca %struct.ld2, align 16
23 store ptr %v, ptr %v.addr, align 8
24 store ppc_fp128 0xM403B0000000000000000000000000000, ptr %z, align 16
25 %arrayidx2 = getelementptr inbounds [2 x ppc_fp128], ptr %z, i32 0, i64 1
26 store ppc_fp128 0xM4093B400000000000000000000000000, ptr %arrayidx2, align 16
27 %0 = load ptr, ptr %v.addr, align 8
28 %1 = load [2 x i128], ptr %z, align 1
29 call void @bar(ptr %0, [2 x i128] %1)
34 attributes #0 = { nounwind }
36 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
37 ; CHECK-MODIFY-CFG: {{.*}}
38 ; CHECK-PRESERVE-CFG: {{.*}}