1 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis > %t1.ll
2 ; RUN: grep udiv %t1.ll | count 3
3 ; RUN: grep zext %t1.ll | count 3
6 ; The udiv instructions shouldn't be optimized away, and the
7 ; sext instructions should be optimized to zext.
9 define i64 @foo(i32 %x) nounwind {
11 %z = sext i32 %r to i64
14 define i64 @bar(i32 %x) nounwind {
17 %z = sext i32 %r to i64
20 define i64 @qux(i32 %x, i32 %v) nounwind {
23 %z = sext i32 %r to i64