blob: a7ff84a65e6a8cfdc58a4249ea1c2e05531825d2 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; With reassociation, constant folding can eliminate the 12 and -12 constants.
2;
3; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add
4
5int %test(int %arg) {
6 %tmp1 = sub int -12, %arg
7 %tmp2 = add int %tmp1, 12
8 ret int %tmp2
9}