xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/bdzlr.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-crbits | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s -check-prefix=CHECK-CRB
3*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
4*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker%struct.lua_TValue.17.692 = type { %union.Value.16.691, i32 }
7*9880d681SAndroid Build Coastguard Worker%union.Value.16.691 = type { %union.GCObject.15.690* }
8*9880d681SAndroid Build Coastguard Worker%union.GCObject.15.690 = type { %struct.lua_State.14.689 }
9*9880d681SAndroid Build Coastguard Worker%struct.lua_State.14.689 = type { %union.GCObject.15.690*, i8, i8, i8, %struct.lua_TValue.17.692*, %struct.lua_TValue.17.692*, %struct.global_State.10.685*, %struct.CallInfo.11.686*, i32*, %struct.lua_TValue.17.692*, %struct.lua_TValue.17.692*, %struct.CallInfo.11.686*, %struct.CallInfo.11.686*, i32, i32, i16, i16, i8, i8, i32, i32, void (%struct.lua_State.14.689*, %struct.lua_Debug.12.687*)*, %struct.lua_TValue.17.692, %struct.lua_TValue.17.692, %union.GCObject.15.690*, %union.GCObject.15.690*, %struct.lua_longjmp.13.688*, i64 }
10*9880d681SAndroid Build Coastguard Worker%struct.global_State.10.685 = type { %struct.stringtable.0.675, i8* (i8*, i8*, i64, i64)*, i8*, i8, i8, i32, %union.GCObject.15.690*, %union.GCObject.15.690**, %union.GCObject.15.690*, %union.GCObject.15.690*, %union.GCObject.15.690*, %union.GCObject.15.690*, %struct.Mbuffer.1.676, i64, i64, i64, i64, i32, i32, i32 (%struct.lua_State.14.689*)*, %struct.lua_TValue.17.692, %struct.lua_State.14.689*, %struct.UpVal.3.678, [9 x %struct.Table.7.682*], [17 x %union.TString.9.684*] }
11*9880d681SAndroid Build Coastguard Worker%struct.stringtable.0.675 = type { %union.GCObject.15.690**, i32, i32 }
12*9880d681SAndroid Build Coastguard Worker%struct.Mbuffer.1.676 = type { i8*, i64, i64 }
13*9880d681SAndroid Build Coastguard Worker%struct.UpVal.3.678 = type { %union.GCObject.15.690*, i8, i8, %struct.lua_TValue.17.692*, %union.anon.2.677 }
14*9880d681SAndroid Build Coastguard Worker%union.anon.2.677 = type { %struct.lua_TValue.17.692 }
15*9880d681SAndroid Build Coastguard Worker%struct.Table.7.682 = type { %union.GCObject.15.690*, i8, i8, i8, i8, %struct.Table.7.682*, %struct.lua_TValue.17.692*, %struct.Node.6.681*, %struct.Node.6.681*, %union.GCObject.15.690*, i32 }
16*9880d681SAndroid Build Coastguard Worker%struct.Node.6.681 = type { %struct.lua_TValue.17.692, %union.TKey.5.680 }
17*9880d681SAndroid Build Coastguard Worker%union.TKey.5.680 = type { %struct.anon.0.4.679 }
18*9880d681SAndroid Build Coastguard Worker%struct.anon.0.4.679 = type { %union.Value.16.691, i32, %struct.Node.6.681* }
19*9880d681SAndroid Build Coastguard Worker%union.TString.9.684 = type { %struct.anon.1.8.683 }
20*9880d681SAndroid Build Coastguard Worker%struct.anon.1.8.683 = type { %union.GCObject.15.690*, i8, i8, i8, i32, i64 }
21*9880d681SAndroid Build Coastguard Worker%struct.CallInfo.11.686 = type { %struct.lua_TValue.17.692*, %struct.lua_TValue.17.692*, %struct.lua_TValue.17.692*, i32*, i32, i32 }
22*9880d681SAndroid Build Coastguard Worker%struct.lua_Debug.12.687 = type { i32, i8*, i8*, i8*, i8*, i32, i32, i32, i32, [60 x i8], i32 }
23*9880d681SAndroid Build Coastguard Worker%struct.lua_longjmp.13.688 = type opaque
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerdefine void @lua_xmove(i32 signext %n) #0 {
26*9880d681SAndroid Build Coastguard Workerentry:
27*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %for.end, label %if.end
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Workerif.end:                                           ; preds = %entry
30*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %for.body.lr.ph, label %for.end
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Workerfor.body.lr.ph:                                   ; preds = %if.end
33*9880d681SAndroid Build Coastguard Worker  br label %for.body
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Workerfor.body:                                         ; preds = %for.body.for.body_crit_edge, %for.body.lr.ph
36*9880d681SAndroid Build Coastguard Worker  %0 = phi %struct.lua_TValue.17.692* [ undef, %for.body.lr.ph ], [ %.pre, %for.body.for.body_crit_edge ]
37*9880d681SAndroid Build Coastguard Worker  %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body.for.body_crit_edge ]
38*9880d681SAndroid Build Coastguard Worker  %tt = getelementptr inbounds %struct.lua_TValue.17.692, %struct.lua_TValue.17.692* %0, i64 %indvars.iv, i32 1
39*9880d681SAndroid Build Coastguard Worker  %1 = load i32, i32* %tt, align 4
40*9880d681SAndroid Build Coastguard Worker  %2 = add i32 %1, %1
41*9880d681SAndroid Build Coastguard Worker  store i32 %2, i32* %tt, align 4
42*9880d681SAndroid Build Coastguard Worker  %indvars.iv.next = add i64 %indvars.iv, 1
43*9880d681SAndroid Build Coastguard Worker  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
44*9880d681SAndroid Build Coastguard Worker  %exitcond = icmp eq i32 %lftr.wideiv, %n
45*9880d681SAndroid Build Coastguard Worker  br i1 %exitcond, label %for.end, label %for.body.for.body_crit_edge
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerfor.body.for.body_crit_edge:                      ; preds = %for.body
48*9880d681SAndroid Build Coastguard Worker  %.pre = load %struct.lua_TValue.17.692*, %struct.lua_TValue.17.692** undef, align 8
49*9880d681SAndroid Build Coastguard Worker  br label %for.body
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Workerfor.end:                                          ; preds = %for.body, %if.end, %entry
52*9880d681SAndroid Build Coastguard Worker  ret void
53*9880d681SAndroid Build Coastguard Worker
54*9880d681SAndroid Build Coastguard Worker; CHECK: @lua_xmove
55*9880d681SAndroid Build Coastguard Worker; CHECK: bnelr
56*9880d681SAndroid Build Coastguard Worker; CHECK: bnelr
57*9880d681SAndroid Build Coastguard Worker; CHECK: bdzlr
58*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: blr
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Worker; CHECK-CRB: @lua_xmove
61*9880d681SAndroid Build Coastguard Worker; CHECK-CRB: bclr 12,
62*9880d681SAndroid Build Coastguard Worker; CHECK-CRB: bclr 12,
63*9880d681SAndroid Build Coastguard Worker; CHECK-CRB: bdzlr
64*9880d681SAndroid Build Coastguard Worker; CHECK-CRB-NOT: blr
65*9880d681SAndroid Build Coastguard Worker}
66*9880d681SAndroid Build Coastguard Worker
67*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind }
68