llvm-6502/test/Transforms/GCSE/2002-05-14-OperandSwap.ll
Reid Spencer 2aabd0722d For PR1319:
Upgrade to use new Tcl exec based test harness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 08:30:33 +00:00

19 lines
588 B
LLVM

; This entire chain of computation should be optimized away, but
; wasn't because the two multiplies were not detected as being identical.
;
; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine -dce | \
; RUN: llvm-dis | not grep sub
implementation ; Functions:
uint "vnum_test4"(uint* %data) {
%idx1 = getelementptr uint* %data, uint 1
%idx2 = getelementptr uint* %data, uint 3
%reg1101 = load uint* %idx1
%reg1111 = load uint* %idx2
%reg109 = mul uint %reg1101, %reg1111
%reg108 = mul uint %reg1111, %reg1101
%reg121 = sub uint %reg108, %reg109
ret uint %reg121
}