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
5 %class.PB2 = type { [1 x i32], %class.PB1* }
6 %class.PB1 = type { [1 x i32], i64, i64, i32 }
8 ; Function Attrs: norecurse nounwind readonly
9 define zeroext i1 @test1(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: lwz 3, 0(3)
13 ; CHECK-NEXT: lwz 4, 0(4)
14 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
15 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
16 ; CHECK-NEXT: sub 3, 3, 4
17 ; CHECK-NEXT: rldicl 3, 3, 1, 63
20 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
21 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
22 %and.i = and i32 %0, 8
23 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
24 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
25 %and.i4 = and i32 %1, 8
26 %cmp.i5 = icmp ult i32 %and.i, %and.i4
30 ; Function Attrs: norecurse nounwind readonly
31 define zeroext i1 @test2(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: lwz 3, 0(3)
35 ; CHECK-NEXT: lwz 4, 0(4)
36 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
37 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
38 ; CHECK-NEXT: sub 3, 4, 3
39 ; CHECK-NEXT: not 3, 3
40 ; CHECK-NEXT: rldicl 3, 3, 1, 63
43 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
44 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
45 %and.i = and i32 %0, 8
46 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
47 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
48 %and.i4 = and i32 %1, 8
49 %cmp.i5 = icmp ule i32 %and.i, %and.i4
53 ; Function Attrs: norecurse nounwind readonly
54 define zeroext i1 @test3(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: lwz 3, 0(3)
58 ; CHECK-NEXT: lwz 4, 0(4)
59 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
60 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
61 ; CHECK-NEXT: sub 3, 4, 3
62 ; CHECK-NEXT: rldicl 3, 3, 1, 63
65 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
66 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
67 %and.i = and i32 %0, 8
68 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
69 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
70 %and.i4 = and i32 %1, 8
71 %cmp.i5 = icmp ugt i32 %and.i, %and.i4
75 ; Function Attrs: norecurse nounwind readonly
76 define zeroext i1 @test4(%class.PB2* %s_a, %class.PB2* %s_b) local_unnamed_addr #0 {
78 ; CHECK: # %bb.0: # %entry
79 ; CHECK-NEXT: lwz 3, 0(3)
80 ; CHECK-NEXT: lwz 4, 0(4)
81 ; CHECK-NEXT: rlwinm 3, 3, 0, 28, 28
82 ; CHECK-NEXT: rlwinm 4, 4, 0, 28, 28
83 ; CHECK-NEXT: sub 3, 3, 4
84 ; CHECK-NEXT: not 3, 3
85 ; CHECK-NEXT: rldicl 3, 3, 1, 63
88 %arrayidx.i6 = bitcast %class.PB2* %s_a to i32*
89 %0 = load i32, i32* %arrayidx.i6, align 8, !tbaa !1
90 %and.i = and i32 %0, 8
91 %arrayidx.i37 = bitcast %class.PB2* %s_b to i32*
92 %1 = load i32, i32* %arrayidx.i37, align 8, !tbaa !1
93 %and.i4 = and i32 %1, 8
94 %cmp.i5 = icmp uge i32 %and.i, %and.i4
99 !2 = !{!"int", !3, i64 0}
100 !3 = !{!"omnipotent char", !4, i64 0}
101 !4 = !{!"Simple C++ TBAA"}