From a3c4ba427b6f1ea2abe62e33695a032112d8d3b8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 4 Nov 2002 16:35:14 +0000 Subject: [PATCH] Add new getelementptr elimination test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4535 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/getelementptr.ll | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll index 2b5ad7e8a7c..0ef6d0ddee0 100644 --- a/test/Transforms/InstCombine/getelementptr.ll +++ b/test/Transforms/InstCombine/getelementptr.ll @@ -35,3 +35,10 @@ sbyte * %foo5() { %A = getelementptr [10 x sbyte]* %Global, long 0, long 4 ret sbyte* %A } + +int* %foo6() { + %M = malloc [4 x int] + %A = getelementptr [4 x int]* %M, long 0, long 0 + %B = getelementptr int* %A, long 2 + ret int* %B +}