1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr10 < %s | \
3 ; RUN: FileCheck --check-prefix=CHECK %s
4 ; RUN: llc -O0 -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr10 -vec-extabi < %s | \
5 ; RUN: FileCheck --check-prefix=CHECK-VEXT %s
7 define dso_local noundef signext i32 @virtualCall(ptr noundef %b) #0 {
8 ; CHECK-LABEL: virtualCall:
9 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: std 0, 16(1)
12 ; CHECK-NEXT: stdu 1, -128(1)
13 ; CHECK-NEXT: std 3, 120(1)
14 ; CHECK-NEXT: ld 3, 120(1)
15 ; CHECK-NEXT: ld 4, 0(3)
16 ; CHECK-NEXT: ld 4, 0(4)
18 ; CHECK-NEXT: std 5, 40(1)
19 ; CHECK-NEXT: ld 5, 8(4)
20 ; CHECK-NEXT: ld 11, 16(4)
21 ; CHECK-NEXT: ld 4, 0(4)
25 ; CHECK-NEXT: ld 2, 40(1)
26 ; CHECK-NEXT: # kill: def $r3 killed $r3 killed $x3
27 ; CHECK-NEXT: extsw 3, 3
28 ; CHECK-NEXT: addi 1, 1, 128
29 ; CHECK-NEXT: ld 0, 16(1)
33 ; CHECK-VEXT-LABEL: virtualCall:
34 ; CHECK-VEXT: # %bb.0: # %entry
35 ; CHECK-VEXT-NEXT: mflr 0
36 ; CHECK-VEXT-NEXT: std 0, 16(1)
37 ; CHECK-VEXT-NEXT: stdu 1, -128(1)
38 ; CHECK-VEXT-NEXT: std 3, 120(1)
39 ; CHECK-VEXT-NEXT: ld 3, 120(1)
40 ; CHECK-VEXT-NEXT: ld 4, 0(3)
41 ; CHECK-VEXT-NEXT: ld 4, 0(4)
42 ; CHECK-VEXT-NEXT: mr 5, 2
43 ; CHECK-VEXT-NEXT: std 5, 40(1)
44 ; CHECK-VEXT-NEXT: ld 5, 8(4)
45 ; CHECK-VEXT-NEXT: ld 11, 16(4)
46 ; CHECK-VEXT-NEXT: ld 4, 0(4)
47 ; CHECK-VEXT-NEXT: mr 2, 5
48 ; CHECK-VEXT-NEXT: mtctr 4
49 ; CHECK-VEXT-NEXT: bctrl
50 ; CHECK-VEXT-NEXT: ld 2, 40(1)
51 ; CHECK-VEXT-NEXT: # kill: def $r3 killed $r3 killed $x3
52 ; CHECK-VEXT-NEXT: extsw 3, 3
53 ; CHECK-VEXT-NEXT: addi 1, 1, 128
54 ; CHECK-VEXT-NEXT: ld 0, 16(1)
55 ; CHECK-VEXT-NEXT: mtlr 0
56 ; CHECK-VEXT-NEXT: blr
58 %b.addr = alloca ptr, align 8
59 store ptr %b, ptr %b.addr, align 8
60 %0 = load ptr, ptr %b.addr, align 8
61 %vtable = load ptr, ptr %0, align 8
62 %1 = load ptr, ptr %vtable, align 8
63 %call = call noundef signext i32 %1(ptr noundef nonnull align 8 dereferenceable(8) %0)