1 ; RUN: llc < %s -march=x86-64 | grep movzbl | count 2 2 3 ; Use movzbl to avoid partial-register updates. 4 5 define i32 @foo(i32 %p, i8 zeroext %x) nounwind { 6 %q = trunc i32 %p to i8 7 %r = udiv i8 %q, %x 8 %s = zext i8 %r to i32 9 %t = and i32 %s, 1 10 ret i32 %t 11 } 12 define i32 @bar(i32 %p, i16 zeroext %x) nounwind { 13 %q = trunc i32 %p to i16 14 %r = udiv i16 %q, %x 15 %s = zext i16 %r to i32 16 %t = and i32 %s, 1 17 ret i32 %t 18 } 19