1 ; There should be exactly one shift and one add left.
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep shl | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
5 int %test(int %X, int %Y) {
6 %tmp.2 = shl int %X, ubyte 1 ; <int> [#uses=1]
7 %tmp.6 = shl int %Y, ubyte 1 ; <int> [#uses=1]
8 %tmp.4 = add int %tmp.6, %tmp.2 ; <int> [#uses=1]