aggregateInstructions.3.2.ll 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. ; RUN: llvm-dis < %s.bc| FileCheck %s
  2. ; RUN: verify-uselistorder < %s.bc
  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. define void @extractvalue([4 x i8] %x1, [4 x [4 x i8]] %x2, {{i32, float}} %x3){
  7. entry:
  8. ; CHECK: %res1 = extractvalue [4 x i8] %x1, 0
  9. %res1 = extractvalue [4 x i8] %x1, 0
  10. ; CHECK-NEXT: %res2 = extractvalue [4 x [4 x i8]] %x2, 1
  11. %res2 = extractvalue [4 x [4 x i8 ]] %x2, 1
  12. ; CHECK-NEXT: %res3 = extractvalue [4 x [4 x i8]] %x2, 0, 1
  13. %res3 = extractvalue [4 x [4 x i8 ]] %x2, 0, 1
  14. ; CHECK-NEXT: %res4 = extractvalue { { i32, float } } %x3, 0, 1
  15. %res4 = extractvalue {{i32, float}} %x3, 0, 1
  16. ret void
  17. }
  18. define void @insertvalue([4 x [4 x i8 ]] %x1){
  19. entry:
  20. ; CHECK: %res1 = insertvalue [4 x [4 x i8]] %x1, i8 0, 0, 0
  21. %res1 = insertvalue [4 x [4 x i8 ]] %x1, i8 0, 0, 0
  22. ; CHECK-NEXT: %res2 = insertvalue [4 x [4 x i8]] undef, i8 0, 0, 0
  23. %res2 = insertvalue [4 x [4 x i8 ]] undef, i8 0, 0, 0
  24. ret void
  25. }