From 94d5466fa179061f2d651e75e9ccabe38ad9d608 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 23 Feb 2006 00:12:12 +0000 Subject: [PATCH] Add a test case for 'lea'. llvm-svn: 26322 --- llvm/test/Regression/CodeGen/X86/lea.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/Regression/CodeGen/X86/lea.ll diff --git a/llvm/test/Regression/CodeGen/X86/lea.ll b/llvm/test/Regression/CodeGen/X86/lea.ll new file mode 100644 index 000000000000..07cb1805e83f --- /dev/null +++ b/llvm/test/Regression/CodeGen/X86/lea.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep lea + +%G = weak global int 0 +int %test1(int* %P, int %X) { + %tmp.1 = getelementptr int* %P, int %X + %tmp.2 = load int* %tmp.1 + store int %tmp.2, int* %G + %tmp.3 = sub int %tmp.2, 9 + ret int %tmp.3 +}