2002-05-15 00:40:43 +08:00
|
|
|
; Instcombine was missing a test that caused it to make illegal transformations
|
|
|
|
; sometimes. In this case, it transforms the sub into an add:
|
2002-08-15 01:38:15 +08:00
|
|
|
; RUN: echo foo
|
2003-09-16 23:29:54 +08:00
|
|
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add
|
2002-05-15 00:40:43 +08:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
int "test"(int %i, int %j) {
|
|
|
|
%A = mul int %i, %j
|
|
|
|
%B = sub int 2, %A
|
|
|
|
ret int %B
|
|
|
|
}
|