1 ; RUN: llc < %s -mtriple=i686-- | FileCheck -check-prefix=X86 %s
2 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck -check-prefix=X64 %s
11 ; These should use movzbl instead of 'and 255'.
12 ; This related to not having a ZERO_EXTEND_REG opcode.
14 define i32 @a(i32 %d) nounwind {
16 %retval = and i32 %e, 255
19 define i32 @b(float %d) nounwind {
20 %tmp12 = fptoui float %d to i8
21 %retval = zext i8 %tmp12 to i32
24 define i32 @c(i32 %d) nounwind {
26 %retval = and i32 %e, 65535
29 define i64 @d(i64 %d) nounwind {
31 %retval = and i64 %e, 255
34 define i64 @e(i64 %d) nounwind {
36 %retval = and i64 %e, 65535
39 define i64 @f(i64 %d) nounwind {
41 %retval = and i64 %e, 4294967295
45 define i32 @g(i8 %d) nounwind {
47 %retval = zext i8 %e to i32
50 define i32 @h(i16 %d) nounwind {
52 %retval = zext i16 %e to i32
55 define i64 @i(i8 %d) nounwind {
57 %retval = zext i8 %e to i64
60 define i64 @j(i16 %d) nounwind {
62 %retval = zext i16 %e to i64
65 define i64 @k(i32 %d) nounwind {
67 %retval = zext i32 %e to i64