1 ; RUN: llc -verify-machineinstrs -mcpu=ppc64 -ppc-asm-full-reg-names < %s | FileCheck %s
2 target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
3 target triple = "powerpc-unknown-linux-gnu"
5 %struct.sm = type { i8, i8 }
7 ; Function Attrs: nounwind ssp
8 define void @foo(%struct.sm* byval(%struct.sm) %s) #0 {
10 %a = getelementptr inbounds %struct.sm, %struct.sm* %s, i32 0, i32 0
11 %0 = load i8, i8* %a, align 1
12 %conv2 = zext i8 %0 to i32
13 %add = add nuw nsw i32 %conv2, 3
14 %conv1 = trunc i32 %add to i8
15 store i8 %conv1, i8* %a, align 1
16 call void @bar(%struct.sm* byval(%struct.sm) %s, %struct.sm* byval(%struct.sm) %s) #1
21 ; CHECK: stb {{r[0-9]+}}, [[OFF:[0-9]+]]({{r[3?1]}})
22 ; CHECK: lhz r4, [[OFF]]({{r[3?1]}})
26 declare void @bar(%struct.sm* byval(%struct.sm), %struct.sm* byval(%struct.sm))
28 attributes #0 = { nounwind ssp }
29 attributes #1 = { nounwind }