1 ; The induction variable canonicalization pass shouldn't leave dead
2 ; instructions laying around!
4 ; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep '#uses=0'
6 int %mul(int %x, int %y) {
10 tailrecurse: ; preds = %entry, %endif
11 %accumulator.tr = phi int [ %x, %entry ], [ %tmp.9, %endif ] ; <int> [#uses=2]
12 %y.tr = phi int [ %y, %entry ], [ %tmp.8, %endif ] ; <int> [#uses=2]
13 %tmp.1 = seteq int %y.tr, 0 ; <bool> [#uses=1]
14 br bool %tmp.1, label %return, label %endif
16 endif: ; preds = %tailrecurse
17 %tmp.8 = add int %y.tr, -1 ; <int> [#uses=1]
18 %tmp.9 = add int %accumulator.tr, %x ; <int> [#uses=1]
21 return: ; preds = %tailrecurse
22 ret int %accumulator.tr