[InstCombine] Recognize another bswap idiom.
[oota-llvm.git] / test / Transforms / ScalarRepl / 2003-09-12-IncorrectPromote.ll
1 ; Scalar replacement was incorrectly promoting this alloca!!
2 ;
3 ; RUN: opt < %s -scalarrepl -S | FileCheck %s
4
5 define i8* @test() {
6         %A = alloca [30 x i8]           ; <[30 x i8]*> [#uses=1]
7         %B = getelementptr [30 x i8], [30 x i8]* %A, i64 0, i64 0               ; <i8*> [#uses=2]
8         %C = getelementptr i8, i8* %B, i64 1            ; <i8*> [#uses=1]
9         store i8 0, i8* %B
10         ret i8* %C
11 }
12 ; CHECK: alloca [