llvm.org GIT mirror llvm / f54d0de
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2628 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
1 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; This entire chain of computation should be optimized away, but
1 ; wasn't because the two multiplies were not detected as being identical.
2 ;
3 ; RUN: if as < %s | opt -gcse -instcombine -dce | dis | grep sub
4 ; RUN: then exit 1
5 ; RUN: else exit 0
6 ; RUN: fi
7
8 implementation ; Functions:
9
10 uint "vnum_test4"(uint* %data) {
11 %reg1101 = load uint* %data, uint 1
12 %reg1111 = load uint* %data, uint 3
13 %reg109 = mul uint %reg1101, %reg1111
14 %reg108 = mul uint %reg1111, %reg1101
15 %reg121 = sub uint %reg108, %reg109
16 ret uint %reg121
17 }