mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 04:22:57 +02:00
4572ce85b0
llvm-svn: 33296
11 lines
301 B
LLVM
11 lines
301 B
LLVM
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
|
|
;
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
|
|
|
|
int "test"(int %A, int %B) {
|
|
%X = add int -12, %A
|
|
%Y = sub int %X, %B
|
|
%Z = add int %Y, 12
|
|
ret int %Z
|
|
}
|