1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 23:42:52 +01:00
llvm-mirror/test/Regression/Transforms/TailDup/MergeTest.ll
Chris Lattner 7a3968b6c0 When tail duplicating these functions, the add instruction should not be
duplicated, even though the block it is in is duplicated.

llvm-svn: 16757
2004-10-06 03:26:38 +00:00

32 lines
475 B
LLVM

; RUN: llvm-as < %s | opt -tailduplicate | llvm-dis | grep add | not grep uses=1
int %test1(bool %C, int %A, int* %P) {
entry:
br bool %C, label %L1, label %L2
L1:
store int 1, int* %P
br label %L2
L2:
%X = add int %A, 17
ret int %X
}
int %test2(bool %C, int %A, int* %P) {
entry:
br bool %C, label %L1, label %L2
L1:
store int 1, int* %P
br label %L3
L2:
store int 7, int* %P
br label %L3
L3:
%X = add int %A, 17
ret int %X
}