1 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
2 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
4 @a = global i8 1, align 1
5 @b = global i16 2, align 2
6 @c = global i32 4, align 4
8 define void @t1() nounwind {
10 %1 = load i8, ptr @a, align 1
11 call void @foo1(i8 zeroext %1)
18 define void @t2() nounwind {
20 %1 = load i16, ptr @b, align 2
21 call void @foo2(i16 zeroext %1)
28 define void @t2a() nounwind {
30 %1 = load i32, ptr @c, align 4
31 call void @foo3(i32 zeroext %1)
38 declare void @foo1(i8 zeroext)
39 declare void @foo2(i16 zeroext)
40 declare void @foo3(i32 zeroext)
42 define i32 @t3() nounwind {
44 %1 = load i8, ptr @a, align 1
45 %2 = zext i8 %1 to i32
51 define i32 @t4() nounwind {
53 %1 = load i16, ptr @b, align 2
54 %2 = zext i16 %1 to i32
60 define i32 @t5() nounwind {
62 %1 = load i16, ptr @b, align 2
63 %2 = sext i16 %1 to i32
69 define i32 @t6() nounwind {
71 %1 = load i8, ptr @a, align 2
72 %2 = sext i8 %1 to i32
78 define i64 @t7() nounwind {
80 %1 = load i8, ptr @a, align 1
81 %2 = zext i8 %1 to i64
87 define i64 @t8() nounwind {
89 %1 = load i16, ptr @b, align 2
90 %2 = zext i16 %1 to i64
96 define i64 @t9() nounwind {
98 %1 = load i16, ptr @b, align 2
99 %2 = sext i16 %1 to i64
105 define i64 @t10() nounwind {
107 %1 = load i8, ptr @a, align 2
108 %2 = sext i8 %1 to i64
114 define i64 @t11() nounwind {
116 %1 = load i32, ptr @c, align 4
117 %2 = zext i32 %1 to i64
123 define i64 @t12() nounwind {
125 %1 = load i32, ptr @c, align 4
126 %2 = sext i32 %1 to i64