1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=ppc64 < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-m:o-p:32:32-f64:32:64-n32" 3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc-apple-macosx10.5.0" 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker%struct.sm = type { i8, i8 } 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind ssp 8*9880d681SAndroid Build Coastguard Workerdefine void @foo(%struct.sm* byval %s) #0 { 9*9880d681SAndroid Build Coastguard Workerentry: 10*9880d681SAndroid Build Coastguard Worker %a = getelementptr inbounds %struct.sm, %struct.sm* %s, i32 0, i32 0 11*9880d681SAndroid Build Coastguard Worker %0 = load i8, i8* %a, align 1 12*9880d681SAndroid Build Coastguard Worker %conv2 = zext i8 %0 to i32 13*9880d681SAndroid Build Coastguard Worker %add = add nuw nsw i32 %conv2, 3 14*9880d681SAndroid Build Coastguard Worker %conv1 = trunc i32 %add to i8 15*9880d681SAndroid Build Coastguard Worker store i8 %conv1, i8* %a, align 1 16*9880d681SAndroid Build Coastguard Worker call void @bar(%struct.sm* byval %s, %struct.sm* byval %s) #1 17*9880d681SAndroid Build Coastguard Worker ret void 18*9880d681SAndroid Build Coastguard Worker} 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @foo 21*9880d681SAndroid Build Coastguard Worker; CHECK: stb {{r[0-9]+}}, [[OFF:[0-9]+]]({{r[3]?1}}) 22*9880d681SAndroid Build Coastguard Worker; CHECK: lhz r3, [[OFF]]({{r[3]?1}}) 23*9880d681SAndroid Build Coastguard Worker; CHECK: bl _bar 24*9880d681SAndroid Build Coastguard Worker; CHECK: blr 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Workerdeclare void @bar(%struct.sm* byval, %struct.sm* byval) 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind ssp } 29*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind } 30*9880d681SAndroid Build Coastguard Worker 31