hanchenye-llvm-project/llvm/test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll

13 lines
312 B
LLVM
Raw Normal View History

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:
; RUN: echo foo
; 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
}