1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -break-anti-dependencies=none | FileCheck %s
3 ;;;;; target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
4 target triple = "powerpc-unknown-linux-gnu.6"
6 define void @foo() nounwind {
8 ; Note that part of what is being checked here is proper register reuse.
9 ; CHECK: mfcr [[T1:[0-9]+]]
10 ; CHECK-DAG: sub 0, 1, 0
11 ; CHECK-DAG: ori [[T2:[0-9]+]], [[T2]], 34492
12 ; CHECK-DAG: stwx [[T1]], 1, [[T2]]
13 ; CHECK-DAG: addi 3, 1, 28
15 %x = alloca [100000 x i8] ; <ptr> [#uses=1]
16 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
17 call void @bar(ptr %x) nounwind
18 call void asm sideeffect "", "~{cr2},~{cr3}"() nounwind
21 return: ; preds = %entry
22 ; CHECK: ori [[T2]], [[T2]], 34492
23 ; CHECK: lwzx [[T1]], 1, [[T2]]
24 ; CHECK: mtcrf 32, [[T1]]
25 ; CHECK: mtcrf 16, [[T1]]
29 declare void @bar(ptr)