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(ptr byval(%struct.sm) %s) #0 {
10 %0 = load i8, ptr %s, align 1
11 %conv2 = zext i8 %0 to i32
12 %add = add nuw nsw i32 %conv2, 3
13 %conv1 = trunc i32 %add to i8
14 store i8 %conv1, ptr %s, align 1
15 call void @bar(ptr byval(%struct.sm) %s, ptr byval(%struct.sm) %s) #1
20 ; CHECK: stb {{r[0-9]+}}, [[OFF:[0-9]+]]({{r[3?1]}})
21 ; CHECK: lhz r4, [[OFF]]({{r[3?1]}})
25 declare void @bar(ptr byval(%struct.sm), ptr byval(%struct.sm))
27 attributes #0 = { nounwind ssp }
28 attributes #1 = { nounwind }