1
; RUN: llc < %s -mtriple=powerpc-apple-darwin | 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-apple-darwin9.6"
5
; This formerly used R0 for both the stack address and CR.
7
define void @foo() nounwind {
10
;CHECK: rlwinm r2, r2, 8, 0, 31
12
;CHECK: ori r0, r0, 34540
13
;CHECK: stwx r2, r1, r0
14
%x = alloca [100000 x i8] ; <[100000 x i8]*> [#uses=1]
15
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
16
%x1 = bitcast [100000 x i8]* %x to i8* ; <i8*> [#uses=1]
17
call void @bar(i8* %x1) nounwind
18
call void asm sideeffect "", "~{cr2}"() nounwind
21
return: ; preds = %entry
23
;CHECK: ori r0, r0, 34540
24
;CHECK: lwzx r2, r1, r0
25
;CHECK: rlwinm r2, r2, 24, 0, 31
30
declare void @bar(i8*)