1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr8 < %s | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr8 \
5 ; RUN: < %s -vec-extabi | FileCheck %s
7 %class.PB2 = type { [1 x i32], %class.PB1* }
8 %class.PB1 = type { [1 x i32], i64, i64, i32 }
10 ; Function Attrs: norecurse nounwind readonly
11 define zeroext i1 @test1(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
13 ; CHECK: # %bb.0: # %entry
14 ; CHECK-NEXT: lwz 3, 0(3)
15 ; CHECK-NEXT: lwz 4, 0(4)
16 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
17 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
18 ; CHECK-NEXT: sub 3, 3, 4
19 ; CHECK-NEXT: rldicl 3, 3, 1, 63
22 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
23 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
24 %and.i = and i32 %0, 8
25 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
26 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
27 %and.i4 = and i32 %1, 8
28 %cmp.i5 = icmp ult i32 %and.i, %and.i4
32 ; Function Attrs: norecurse nounwind readonly
33 define zeroext i1 @test2(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: lwz 3, 0(3)
37 ; CHECK-NEXT: lwz 4, 0(4)
38 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
39 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
40 ; CHECK-NEXT: sub 3, 4, 3
41 ; CHECK-NEXT: not 3, 3
42 ; CHECK-NEXT: rldicl 3, 3, 1, 63
45 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
46 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
47 %and.i = and i32 %0, 8
48 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
49 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
50 %and.i4 = and i32 %1, 8
51 %cmp.i5 = icmp ule i32 %and.i, %and.i4
55 ; Function Attrs: norecurse nounwind readonly
56 define zeroext i1 @test3(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
58 ; CHECK: # %bb.0: # %entry
59 ; CHECK-NEXT: lwz 3, 0(3)
60 ; CHECK-NEXT: lwz 4, 0(4)
61 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
62 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
63 ; CHECK-NEXT: sub 3, 4, 3
64 ; CHECK-NEXT: rldicl 3, 3, 1, 63
67 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
68 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
69 %and.i = and i32 %0, 8
70 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
71 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
72 %and.i4 = and i32 %1, 8
73 %cmp.i5 = icmp ugt i32 %and.i, %and.i4
77 ; Function Attrs: norecurse nounwind readonly
78 define zeroext i1 @test4(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: lwz 3, 0(3)
82 ; CHECK-NEXT: lwz 4, 0(4)
83 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
84 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
85 ; CHECK-NEXT: sub 3, 3, 4
86 ; CHECK-NEXT: not 3, 3
87 ; CHECK-NEXT: rldicl 3, 3, 1, 63
90 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
91 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
92 %and.i = and i32 %0, 8
93 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
94 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
95 %and.i4 = and i32 %1, 8
96 %cmp.i5 = icmp uge i32 %and.i, %and.i4
100 !1 = !{!2, !2, i64 0}
101 !2 = !{!"int", !3, i64 0}
102 !3 = !{!"omnipotent char", !4, i64 0}
103 !4 = !{!"Simple C++ TBAA"}