blob: ac5932053fd3bfd5cdac0e0dfbe22fe4657af6f9 [file] [log] [blame]
Chris Lattner557a1432002-05-08 21:34:22 +00001; With reassociation, constant folding can eliminate the 12 and -12 constants.
2;
3; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep add
4; RUN: then exit 1
5; RUN: else exit 0
6; RUN: fi
7
8int "test"(int %arg) {
9 %tmp1 = sub int -12, %arg
10 %tmp2 = add int %tmp1, 12
11 ret int %tmp2
12}