Home | History | Annotate | Download | only in Bitcode
      1 ; RUN:  llvm-dis < %s.bc| FileCheck %s
      2 
      3 ; aggregateOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
      4 ; The test checks that LLVM does not misread instructions with aggregate operands
      5 ; in older bitcode files.
      6 
      7 define void @extractvalue([4 x i8] %x1, [4 x [4 x i8]] %x2, {{i32, float}} %x3){
      8 entry:
      9 ; CHECK: %res1 = extractvalue [4 x i8] %x1, 0
     10   %res1 = extractvalue [4 x i8] %x1, 0
     11   
     12 ; CHECK-NEXT: %res2 = extractvalue [4 x [4 x i8]] %x2, 1
     13   %res2 = extractvalue [4 x [4 x i8 ]] %x2, 1
     14 
     15 ; CHECK-NEXT: %res3 = extractvalue [4 x [4 x i8]] %x2, 0, 1
     16   %res3 = extractvalue [4 x [4 x i8 ]] %x2, 0, 1
     17   
     18 ; CHECK-NEXT: %res4 = extractvalue { { i32, float } } %x3, 0, 1
     19   %res4 = extractvalue {{i32, float}} %x3, 0, 1
     20 
     21   ret void
     22 }
     23 
     24 define void @insertvalue([4 x [4 x i8 ]] %x1){
     25 entry:
     26 ; CHECK: %res1 = insertvalue [4 x [4 x i8]] %x1, i8 0, 0, 0
     27   %res1 = insertvalue [4 x [4 x i8 ]] %x1, i8 0, 0, 0
     28   
     29 ; CHECK-NEXT: %res2 = insertvalue [4 x [4 x i8]] undef, i8 0, 0, 0
     30   %res2 = insertvalue [4 x [4 x i8 ]] undef, i8 0, 0, 0
     31 
     32   ret void
     33 }