From 9394514eded0a07b2686b6cdb6fada73fe4a2621 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 25 Feb 2006 10:16:10 +0000 Subject: [PATCH] New test case: use lea for imul by some constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26378 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/imul-lea.ll | 8 ++++++++ test/CodeGen/X86/store-global-address.ll | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/CodeGen/X86/imul-lea.ll create mode 100644 test/CodeGen/X86/store-global-address.ll diff --git a/test/CodeGen/X86/imul-lea.ll b/test/CodeGen/X86/imul-lea.ll new file mode 100644 index 00000000000..6f2e3a986e7 --- /dev/null +++ b/test/CodeGen/X86/imul-lea.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep lea + +declare int %foo() +int %test() { + %tmp.0 = tail call int %foo( ) ; [#uses=1] + %tmp.1 = mul int %tmp.0, 9 ; [#uses=1] + ret int %tmp.1 +} diff --git a/test/CodeGen/X86/store-global-address.ll b/test/CodeGen/X86/store-global-address.ll new file mode 100644 index 00000000000..c933714ea61 --- /dev/null +++ b/test/CodeGen/X86/store-global-address.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep movl | wc -l | grep 1 + +%dst = global int 0 +%ptr = global int* null + +void %test() { + store int* %dst, int** %ptr + ret void +} -- 2.34.1