mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
28beeeac4d
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41097 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
430 B
LLVM
15 lines
430 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep mul | count 2
|
|
|
|
; This should have exactly 2 multiplies when we're done.
|
|
|
|
int %f(int %a, int %b) {
|
|
%tmp.2 = mul int %a, %a
|
|
%tmp.5 = shl int %a, ubyte 1
|
|
%tmp.6 = mul int %tmp.5, %b
|
|
%tmp.10 = mul int %b, %b
|
|
%tmp.7 = add int %tmp.6, %tmp.2
|
|
%tmp.11 = add int %tmp.7, %tmp.10
|
|
ret int %tmp.11
|
|
}
|
|
|