highLevelStructure.3.2.ll 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ; RUN: llvm-dis < %s.bc| FileCheck %s
  2. ; highLevelStructure.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
  3. ; The test checks that LLVM does not misread binary float instructions of
  4. ; older bitcode files.
  5. ; Data Layout Test
  6. ; CHECK: target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-a0:0:64-f80:32:32-n8:16:32-S32"
  7. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-a0:0:64-f80:32:32-n8:16:32-S32"
  8. ; Module-Level Inline Assembly Test
  9. ; CHECK: module asm "some assembly"
  10. module asm "some assembly"
  11. ; Named Types Test
  12. ; CHECK: %mytype = type { %mytype*, i32 }
  13. %mytype = type { %mytype*, i32 }
  14. ; Aliases Test
  15. ; CHECK: @glob1 = global i32 1
  16. @glob1 = global i32 1
  17. ; CHECK: @aliased1 = alias i32* @glob1
  18. @aliased1 = alias i32* @glob1
  19. ; CHECK-NEXT: @aliased2 = internal alias i32* @glob1
  20. @aliased2 = internal alias i32* @glob1
  21. ; CHECK-NEXT: @aliased3 = alias i32* @glob1
  22. @aliased3 = external alias i32* @glob1
  23. ; CHECK-NEXT: @aliased4 = weak alias i32* @glob1
  24. @aliased4 = weak alias i32* @glob1
  25. ; CHECK-NEXT: @aliased5 = weak_odr alias i32* @glob1
  26. @aliased5 = weak_odr alias i32* @glob1
  27. ;Parameter Attribute Test
  28. ; CHECK: declare void @ParamAttr1(i8 zeroext)
  29. declare void @ParamAttr1(i8 zeroext)
  30. ; CHECK: declare void @ParamAttr2(i8* nest)
  31. declare void @ParamAttr2(i8* nest)
  32. ; CHECK: declare void @ParamAttr3(i8* sret)
  33. declare void @ParamAttr3(i8* sret)
  34. ; CHECK: declare void @ParamAttr4(i8 signext)
  35. declare void @ParamAttr4(i8 signext)
  36. ; CHECK: declare void @ParamAttr5(i8* inreg)
  37. declare void @ParamAttr5(i8* inreg)
  38. ; CHECK: declare void @ParamAttr6(i8* byval)
  39. declare void @ParamAttr6(i8* byval)
  40. ; CHECK: declare void @ParamAttr7(i8* noalias)
  41. declare void @ParamAttr7(i8* noalias)
  42. ; CHECK: declare void @ParamAttr8(i8* nocapture)
  43. declare void @ParamAttr8(i8* nocapture)
  44. ; CHECK: declare void @ParamAttr9{{[(i8* nest noalias nocapture) | (i8* noalias nocapture nest)]}}
  45. declare void @ParamAttr9(i8* nest noalias nocapture)
  46. ; CHECK: declare void @ParamAttr10{{[(i8* sret noalias nocapture) | (i8* noalias nocapture sret)]}}
  47. declare void @ParamAttr10(i8* sret noalias nocapture)
  48. ;CHECK: declare void @ParamAttr11{{[(i8* byval noalias nocapture) | (i8* noalias nocapture byval)]}}
  49. declare void @ParamAttr11(i8* byval noalias nocapture)
  50. ;CHECK: declare void @ParamAttr12{{[(i8* inreg noalias nocapture) | (i8* noalias nocapture inreg)]}}
  51. declare void @ParamAttr12(i8* inreg noalias nocapture)
  52. ; NamedTypesTest
  53. define void @NamedTypes() {
  54. entry:
  55. ; CHECK: %res = alloca %mytype
  56. %res = alloca %mytype
  57. ret void
  58. }
  59. ; Garbage Collector Name Test
  60. ; CHECK: define void @gcTest() gc "gc"
  61. define void @gcTest() gc "gc" {
  62. entry:
  63. ret void
  64. }
  65. ; Named metadata Test
  66. ; CHECK: !name = !{!0, !1, !2}
  67. !name = !{!0, !1, !2}
  68. ; CHECK: !0 = !{!"zero"}
  69. !0 = metadata !{metadata !"zero"}
  70. ; CHECK: !1 = !{!"one"}
  71. !1 = metadata !{metadata !"one"}
  72. ; CHECK: !2 = !{!"two"}
  73. !2 = metadata !{metadata !"two"}