fix PR4963: folding insertvalue would sometimes turn a packed struct into
[llvm/avr.git] / test / Transforms / SCCP / empty-struct.ll
blob4e3dc69514e5ac9ec2bae95fe5bf5fe555ea486d
1 ; RUN: llvm-as < %s > %t.bc
2 ; RUN: llvm-ld %t.bc -o %t.sh
3 ; PR2612
5 @current_foo = internal global {  } zeroinitializer
7 define i32 @main(...) {
8 entry:
9         %retval = alloca i32            ; <i32*> [#uses=2]
10         store i32 0, i32* %retval
11         %local_foo = alloca {  }                ; <{  }*> [#uses=1]
12         load {  }* @current_foo         ; <{  }>:0 [#uses=1]
13         store {  } %0, {  }* %local_foo
14         br label %return
16 return:         ; preds = %entry
17         load i32* %retval               ; <i32>:1 [#uses=1]
18         ret i32 %1