From: Andrew Lenharth Date: Sun, 2 Apr 2006 21:47:07 +0000 (+0000) Subject: Make sure mul by constant 5 is turned into a s4addq X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f80d2f61afb4f0efe3766a522ae131ffc511d100;p=oota-llvm.git Make sure mul by constant 5 is turned into a s4addq git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27365 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/Alpha/mul5.ll b/test/CodeGen/Alpha/mul5.ll new file mode 100644 index 00000000000..cb19550dc85 --- /dev/null +++ b/test/CodeGen/Alpha/mul5.ll @@ -0,0 +1,16 @@ +; Make sure this testcase does not use mulq +; RUN: llvm-as < %s | llc -march=alpha | grep -i 'mul' |wc -l |grep 0 + +implementation ; Functions: + +ulong %foo(ulong %x) { +entry: + %tmp.1 = mul ulong %x, 5 ; [#uses=1] + ret ulong %tmp.1 +} + +long %bar(long %x) { +entry: + %tmp.1 = mul long %x, 5 ; [#uses=1] + ret long %tmp.1 +}