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