aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/PiNodeInserter/substitutetest.ll
blob: 9c9fa561b21d03bc1e36955c3c04aff9f1db0411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: llvm-as < %s | opt -pinodes -instcombine -die | llvm-dis | not grep add

int "test"(int %i, int %j) {
	%c = seteq int %i, 0
	br bool %c, label %iIsZero, label %iIsNotZero

iIsZero:
	%j2 = add int %j, %i      ; This is always equal to j
	ret int %j2

iIsNotZero:
	ret int 1
}