1; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution
2; RUN: opt < %s -disable-output -scalar-evolution
3; PR4501
4
5define void @test() {
6entry:
7        %0 = load i16, i16* undef, align 1
8        %1 = lshr i16 %0, 8
9        %2 = and i16 %1, 3
10        %3 = zext i16 %2 to i32
11        %4 = load i8, i8* undef, align 1
12        %5 = lshr i8 %4, 4
13        %6 = and i8 %5, 1
14        %7 = zext i8 %6 to i32
15        %t1 = add i32 %3, %7
16        ret void
17}
18