aggregate-constant-values.ll 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
  2. ; RUN: verify-uselistorder %s
  3. ; CHECK: @foo
  4. ; CHECK: store { i32, i32 } { i32 7, i32 9 }, { i32, i32 }* %x
  5. ; CHECK: ret
  6. define void @foo({i32, i32}* %x) nounwind {
  7. store {i32, i32}{i32 7, i32 9}, {i32, i32}* %x
  8. ret void
  9. }
  10. ; CHECK: @foo_empty
  11. ; CHECK: store {} zeroinitializer, {}* %x
  12. ; CHECK: ret
  13. define void @foo_empty({}* %x) nounwind {
  14. store {}{}, {}* %x
  15. ret void
  16. }
  17. ; CHECK: @bar
  18. ; CHECK: store [2 x i32] [i32 7, i32 9], [2 x i32]* %x
  19. ; CHECK: ret
  20. define void @bar([2 x i32]* %x) nounwind {
  21. store [2 x i32][i32 7, i32 9], [2 x i32]* %x
  22. ret void
  23. }
  24. ; CHECK: @bar_empty
  25. ; CHECK: store [0 x i32] undef, [0 x i32]* %x
  26. ; CHECK: ret
  27. define void @bar_empty([0 x i32]* %x) nounwind {
  28. store [0 x i32][], [0 x i32]* %x
  29. ret void
  30. }
  31. ; CHECK: @qux
  32. ; CHECK: store <{ i32, i32 }> <{ i32 7, i32 9 }>, <{ i32, i32 }>* %x
  33. ; CHECK: ret
  34. define void @qux(<{i32, i32}>* %x) nounwind {
  35. store <{i32, i32}><{i32 7, i32 9}>, <{i32, i32}>* %x
  36. ret void
  37. }
  38. ; CHECK: @qux_empty
  39. ; CHECK: store <{}> zeroinitializer, <{}>* %x
  40. ; CHECK: ret
  41. define void @qux_empty(<{}>* %x) nounwind {
  42. store <{}><{}>, <{}>* %x
  43. ret void
  44. }