1 ; RUN: opt < %s -instcombine -S | not grep sext
5 define zeroext i16 @t(i8 zeroext %on_off, i16* nocapture %puls) nounwind readonly {
7 %0 = zext i8 %on_off to i32
9 %2 = sext i32 %1 to i64
10 %3 = getelementptr i16* %puls, i64 %2
11 %4 = load i16* %3, align 2
15 define zeroext i64 @t2(i8 zeroext %on_off) nounwind readonly {
17 %0 = zext i8 %on_off to i32
19 %2 = sext i32 %1 to i64
20 ret i64 %2 ;; Should be (add (zext i8 -> i64), -1)