2
0

binaryFloatInstructions.3.2.ll 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ; RUN: llvm-dis < %s.bc| FileCheck %s
  2. ; RUN: verify-uselistorder < %s.bc
  3. ; BinaryFloatOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
  4. ; The test checks that LLVM does not misread binary float instructions from
  5. ; older bitcode files.
  6. define void @fadd(float %x1, double %x2 ,half %x3, fp128 %x4, x86_fp80 %x5, ppc_fp128 %x6){
  7. entry:
  8. ; CHECK: %res1 = fadd float %x1, %x1
  9. %res1 = fadd float %x1, %x1
  10. ; CHECK-NEXT: %res2 = fadd double %x2, %x2
  11. %res2 = fadd double %x2, %x2
  12. ; CHECK-NEXT: %res3 = fadd half %x3, %x3
  13. %res3 = fadd half %x3, %x3
  14. ; CHECK-NEXT: %res4 = fadd fp128 %x4, %x4
  15. %res4 = fadd fp128 %x4, %x4
  16. ; CHECK-NEXT: %res5 = fadd x86_fp80 %x5, %x5
  17. %res5 = fadd x86_fp80 %x5, %x5
  18. ; CHECK-NEXT: %res6 = fadd ppc_fp128 %x6, %x6
  19. %res6 = fadd ppc_fp128 %x6, %x6
  20. ret void
  21. }
  22. define void @faddFloatVec(<2 x float> %x1, <3 x float> %x2 ,<4 x float> %x3, <8 x float> %x4, <16 x float> %x5){
  23. entry:
  24. ; CHECK: %res1 = fadd <2 x float> %x1, %x1
  25. %res1 = fadd <2 x float> %x1, %x1
  26. ; CHECK-NEXT: %res2 = fadd <3 x float> %x2, %x2
  27. %res2 = fadd <3 x float> %x2, %x2
  28. ; CHECK-NEXT: %res3 = fadd <4 x float> %x3, %x3
  29. %res3 = fadd <4 x float> %x3, %x3
  30. ; CHECK-NEXT: %res4 = fadd <8 x float> %x4, %x4
  31. %res4 = fadd <8 x float> %x4, %x4
  32. ; CHECK-NEXT: %res5 = fadd <16 x float> %x5, %x5
  33. %res5 = fadd <16 x float> %x5, %x5
  34. ret void
  35. }
  36. define void @faddDoubleVec(<2 x double> %x1, <3 x double> %x2 ,<4 x double> %x3, <8 x double> %x4, <16 x double> %x5){
  37. entry:
  38. ; CHECK: %res1 = fadd <2 x double> %x1, %x1
  39. %res1 = fadd <2 x double> %x1, %x1
  40. ; CHECK-NEXT: %res2 = fadd <3 x double> %x2, %x2
  41. %res2 = fadd <3 x double> %x2, %x2
  42. ; CHECK-NEXT: %res3 = fadd <4 x double> %x3, %x3
  43. %res3 = fadd <4 x double> %x3, %x3
  44. ; CHECK-NEXT: %res4 = fadd <8 x double> %x4, %x4
  45. %res4 = fadd <8 x double> %x4, %x4
  46. ; CHECK-NEXT: %res5 = fadd <16 x double> %x5, %x5
  47. %res5 = fadd <16 x double> %x5, %x5
  48. ret void
  49. }
  50. define void @faddHalfVec(<2 x half> %x1, <3 x half> %x2 ,<4 x half> %x3, <8 x half> %x4, <16 x half> %x5){
  51. entry:
  52. ; CHECK: %res1 = fadd <2 x half> %x1, %x1
  53. %res1 = fadd <2 x half> %x1, %x1
  54. ; CHECK-NEXT: %res2 = fadd <3 x half> %x2, %x2
  55. %res2 = fadd <3 x half> %x2, %x2
  56. ; CHECK-NEXT: %res3 = fadd <4 x half> %x3, %x3
  57. %res3 = fadd <4 x half> %x3, %x3
  58. ; CHECK-NEXT: %res4 = fadd <8 x half> %x4, %x4
  59. %res4 = fadd <8 x half> %x4, %x4
  60. ; CHECK-NEXT: %res5 = fadd <16 x half> %x5, %x5
  61. %res5 = fadd <16 x half> %x5, %x5
  62. ret void
  63. }
  64. define void @fsub(float %x1){
  65. entry:
  66. ; CHECK: %res1 = fsub float %x1, %x1
  67. %res1 = fsub float %x1, %x1
  68. ret void
  69. }
  70. define void @fmul(float %x1){
  71. entry:
  72. ; CHECK: %res1 = fmul float %x1, %x1
  73. %res1 = fmul float %x1, %x1
  74. ret void
  75. }
  76. define void @fdiv(float %x1){
  77. entry:
  78. ; CHECK: %res1 = fdiv float %x1, %x1
  79. %res1 = fdiv float %x1, %x1
  80. ret void
  81. }
  82. define void @frem(float %x1){
  83. entry:
  84. ; CHECK: %res1 = frem float %x1, %x1
  85. %res1 = frem float %x1, %x1
  86. ret void
  87. }