blob: 070899bb9f5eaa4af4e998d75d3ac21262d271d4 [file] [log] [blame]
Chris Lattner86498982002-05-14 16:40:43 +00001; Instcombine was missing a test that caused it to make illegal transformations
2; sometimes. In this case, it transforms the sub into an add:
3; RUN: if as < %s | opt -instcombine | dis | grep add
4; RUN: then exit 1
5; RUN: else exit 0
6; RUN: fi
7;
8
9
10int "test"(int %i, int %j) {
11 %A = mul int %i, %j
12 %B = sub int 2, %A
13 ret int %B
14}