From 556d2f601366620678560971e5d8effbf31750a4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Sep 2002 21:02:24 +0000 Subject: [PATCH] New regression test llvm-svn: 3782 --- .../InstCombine/2002-09-17-GetElementPtrCrash.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll diff --git a/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll b/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll new file mode 100644 index 00000000000..18496f2658d --- /dev/null +++ b/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll @@ -0,0 +1,12 @@ +; RUN: as < %s | opt -instcombine + +%bob = type { int } + +int %alias() { + %pbob1 = alloca %bob + %pbob2 = getelementptr %bob* %pbob1 + %pbobel = getelementptr %bob* %pbob2, long 0, ubyte 0 + %rval = load int* %pbobel + ret int %rval +} +