1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 22:12:47 +01:00
llvm-mirror/test/Regression/Transforms/Reassociate/subtest.ll
Chris Lattner 92c56ccbfa New testcases for sub/neg reassociation
llvm-svn: 2635
2002-05-16 00:56:59 +00:00

14 lines
323 B
LLVM

; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
;
; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
int "test"(int %A, int %B) {
%X = add int -12, %A
%Y = sub int %X, %B
%Z = add int %Y, 12
ret int %Z
}