Home | History | Annotate | Download | only in Verifier
      1 ; This used to be invalid, but now it's valid.  Ensure the verifier
      2 ; doesn't reject it.
      3 ; RUN: llvm-as %s -o /dev/null
      4 
      5 declare void @doit(i64* inalloca %a)
      6 
      7 define void @a() {
      8 entry:
      9   %a = alloca inalloca [2 x i32]
     10   %b = bitcast [2 x i32]* %a to i64*
     11   call void @doit(i64* inalloca %b)
     12   ret void
     13 }
     14 
     15 define void @b() {
     16 entry:
     17   %a = alloca inalloca i64
     18   call void @doit(i64* inalloca %a)
     19   call void @doit(i64* inalloca %a)
     20   ret void
     21 }
     22 
     23 define void @c(i1 %cond) {
     24 entry:
     25   br i1 %cond, label %if, label %else
     26 
     27 if:
     28   %a = alloca inalloca i64
     29   br label %call
     30 
     31 else:
     32   %b = alloca inalloca i64
     33   br label %call
     34 
     35 call:
     36   %args = phi i64* [ %a, %if ], [ %b, %else ]
     37   call void @doit(i64* inalloca %args)
     38   ret void
     39 }
     40