llvm.org GIT mirror llvm / release_20 test / Transforms / Reassociate / 2002-05-15-AgressiveSubMove.ll
release_20

Tree @release_20 (Download .tar.gz)

2002-05-15-AgressiveSubMove.ll @release_20raw · history · blame

1
2
3
4
5
6
7
8
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add

int %test(int %A) {
	%X = add int %A, 1
	%Y = add int %A, 1
	%r = sub int %X, %Y
	ret int %r               ; Should be equal to 0!
}