From 1474b47600a8c89c1f62f9e263a0f462628259e0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 21 Jun 2003 22:59:39 +0000 Subject: [PATCH] Add testcase for reason that typesafety of power is being broken git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6836 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/getelementptr.ll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll index 5401e2569d6..52c1ba6768c 100644 --- a/test/Transforms/InstCombine/getelementptr.ll +++ b/test/Transforms/InstCombine/getelementptr.ll @@ -48,3 +48,9 @@ int* %foo7(int* %I, long %C, long %D) { %B = getelementptr int* %A, long %D ret int* %B } + +sbyte* %foo8([10 x int]* %X) { + %A = getelementptr [10 x int]* %X, long 0, long 0 ;; Fold into the cast. + %B = cast int* %A to sbyte* + ret sbyte * %B +} -- 2.34.1