1 ; RUN: llc < %s -mtriple=powerpc-apple-darwin | FileCheck %s 2 ; ModuleID = 'hh.c' 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. 6 7 define void @foo() nounwind { 8 entry: 9 ;CHECK: mfcr r2 10 ;CHECK: rlwinm r2, r2, 8, 0, 31 11 ;CHECK: lis r0, 1 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 19 br label %return 20 21 return: ; preds = %entry 22 ;CHECK: lis r0, 1 23 ;CHECK: ori r0, r0, 34540 24 ;CHECK: lwzx r2, r1, r0 25 ;CHECK: rlwinm r2, r2, 24, 0, 31 26 ;CHECK: mtcrf 32, r2 27 ret void 28 } 29 30 declare void @bar(i8*) 31