1 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
3 @a = global i8 1, align 1
4 @b = global i16 2, align 2
5 @c = global i32 4, align 4
7 define void @t1() nounwind {
9 %1 = load i8, i8* @a, align 1
10 call void @foo1(i8 zeroext %1)
17 define void @t2() nounwind {
19 %1 = load i16, i16* @b, align 2
20 call void @foo2(i16 zeroext %1)
27 define void @t2a() nounwind {
29 %1 = load i32, i32* @c, align 4
30 call void @foo3(i32 zeroext %1)
37 declare void @foo1(i8 zeroext)
38 declare void @foo2(i16 zeroext)
39 declare void @foo3(i32 zeroext)
41 define i32 @t3() nounwind {
43 %1 = load i8, i8* @a, align 1
44 %2 = zext i8 %1 to i32
50 define i32 @t4() nounwind {
52 %1 = load i16, i16* @b, align 2
53 %2 = zext i16 %1 to i32
59 define i32 @t5() nounwind {
61 %1 = load i16, i16* @b, align 2
62 %2 = sext i16 %1 to i32
68 define i32 @t6() nounwind {
70 %1 = load i8, i8* @a, align 2
71 %2 = sext i8 %1 to i32
77 define i64 @t7() nounwind {
79 %1 = load i8, i8* @a, align 1
80 %2 = zext i8 %1 to i64
86 define i64 @t8() nounwind {
88 %1 = load i16, i16* @b, align 2
89 %2 = zext i16 %1 to i64
95 define i64 @t9() nounwind {
97 %1 = load i16, i16* @b, align 2
98 %2 = sext i16 %1 to i64
104 define i64 @t10() nounwind {
106 %1 = load i8, i8* @a, align 2
107 %2 = sext i8 %1 to i64
113 define i64 @t11() nounwind {
115 %1 = load i32, i32* @c, align 4
116 %2 = zext i32 %1 to i64
122 define i64 @t12() nounwind {
124 %1 = load i32, i32* @c, align 4
125 %2 = sext i32 %1 to i64