MachineCombinerPattern.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===-- llvm/CodeGen/MachineCombinerPattern.h - Instruction pattern supported by
  7. // combiner ------*- C++ -*-===//
  8. //
  9. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  10. // See https://llvm.org/LICENSE.txt for license information.
  11. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  12. //
  13. //===----------------------------------------------------------------------===//
  14. //
  15. // This file defines instruction pattern supported by combiner
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_CODEGEN_MACHINECOMBINERPATTERN_H
  19. #define LLVM_CODEGEN_MACHINECOMBINERPATTERN_H
  20. namespace llvm {
  21. /// These are instruction patterns matched by the machine combiner pass.
  22. enum class MachineCombinerPattern {
  23. // These are commutative variants for reassociating a computation chain. See
  24. // the comments before getMachineCombinerPatterns() in TargetInstrInfo.cpp.
  25. REASSOC_AX_BY,
  26. REASSOC_AX_YB,
  27. REASSOC_XA_BY,
  28. REASSOC_XA_YB,
  29. // These are patterns matched by the PowerPC to reassociate FMA chains.
  30. REASSOC_XY_AMM_BMM,
  31. REASSOC_XMM_AMM_BMM,
  32. // These are patterns matched by the PowerPC to reassociate FMA and FSUB to
  33. // reduce register pressure.
  34. REASSOC_XY_BCA,
  35. REASSOC_XY_BAC,
  36. // These are multiply-add patterns matched by the AArch64 machine combiner.
  37. MULADDW_OP1,
  38. MULADDW_OP2,
  39. MULSUBW_OP1,
  40. MULSUBW_OP2,
  41. MULADDWI_OP1,
  42. MULSUBWI_OP1,
  43. MULADDX_OP1,
  44. MULADDX_OP2,
  45. MULSUBX_OP1,
  46. MULSUBX_OP2,
  47. MULADDXI_OP1,
  48. MULSUBXI_OP1,
  49. // NEON integers vectors
  50. MULADDv8i8_OP1,
  51. MULADDv8i8_OP2,
  52. MULADDv16i8_OP1,
  53. MULADDv16i8_OP2,
  54. MULADDv4i16_OP1,
  55. MULADDv4i16_OP2,
  56. MULADDv8i16_OP1,
  57. MULADDv8i16_OP2,
  58. MULADDv2i32_OP1,
  59. MULADDv2i32_OP2,
  60. MULADDv4i32_OP1,
  61. MULADDv4i32_OP2,
  62. MULSUBv8i8_OP1,
  63. MULSUBv8i8_OP2,
  64. MULSUBv16i8_OP1,
  65. MULSUBv16i8_OP2,
  66. MULSUBv4i16_OP1,
  67. MULSUBv4i16_OP2,
  68. MULSUBv8i16_OP1,
  69. MULSUBv8i16_OP2,
  70. MULSUBv2i32_OP1,
  71. MULSUBv2i32_OP2,
  72. MULSUBv4i32_OP1,
  73. MULSUBv4i32_OP2,
  74. MULADDv4i16_indexed_OP1,
  75. MULADDv4i16_indexed_OP2,
  76. MULADDv8i16_indexed_OP1,
  77. MULADDv8i16_indexed_OP2,
  78. MULADDv2i32_indexed_OP1,
  79. MULADDv2i32_indexed_OP2,
  80. MULADDv4i32_indexed_OP1,
  81. MULADDv4i32_indexed_OP2,
  82. MULSUBv4i16_indexed_OP1,
  83. MULSUBv4i16_indexed_OP2,
  84. MULSUBv8i16_indexed_OP1,
  85. MULSUBv8i16_indexed_OP2,
  86. MULSUBv2i32_indexed_OP1,
  87. MULSUBv2i32_indexed_OP2,
  88. MULSUBv4i32_indexed_OP1,
  89. MULSUBv4i32_indexed_OP2,
  90. // Floating Point
  91. FMULADDH_OP1,
  92. FMULADDH_OP2,
  93. FMULSUBH_OP1,
  94. FMULSUBH_OP2,
  95. FMULADDS_OP1,
  96. FMULADDS_OP2,
  97. FMULSUBS_OP1,
  98. FMULSUBS_OP2,
  99. FMULADDD_OP1,
  100. FMULADDD_OP2,
  101. FMULSUBD_OP1,
  102. FMULSUBD_OP2,
  103. FNMULSUBH_OP1,
  104. FNMULSUBS_OP1,
  105. FNMULSUBD_OP1,
  106. FMLAv1i32_indexed_OP1,
  107. FMLAv1i32_indexed_OP2,
  108. FMLAv1i64_indexed_OP1,
  109. FMLAv1i64_indexed_OP2,
  110. FMLAv4f16_OP1,
  111. FMLAv4f16_OP2,
  112. FMLAv8f16_OP1,
  113. FMLAv8f16_OP2,
  114. FMLAv2f32_OP2,
  115. FMLAv2f32_OP1,
  116. FMLAv2f64_OP1,
  117. FMLAv2f64_OP2,
  118. FMLAv4i16_indexed_OP1,
  119. FMLAv4i16_indexed_OP2,
  120. FMLAv8i16_indexed_OP1,
  121. FMLAv8i16_indexed_OP2,
  122. FMLAv2i32_indexed_OP1,
  123. FMLAv2i32_indexed_OP2,
  124. FMLAv2i64_indexed_OP1,
  125. FMLAv2i64_indexed_OP2,
  126. FMLAv4f32_OP1,
  127. FMLAv4f32_OP2,
  128. FMLAv4i32_indexed_OP1,
  129. FMLAv4i32_indexed_OP2,
  130. FMLSv1i32_indexed_OP2,
  131. FMLSv1i64_indexed_OP2,
  132. FMLSv4f16_OP1,
  133. FMLSv4f16_OP2,
  134. FMLSv8f16_OP1,
  135. FMLSv8f16_OP2,
  136. FMLSv2f32_OP1,
  137. FMLSv2f32_OP2,
  138. FMLSv2f64_OP1,
  139. FMLSv2f64_OP2,
  140. FMLSv4i16_indexed_OP1,
  141. FMLSv4i16_indexed_OP2,
  142. FMLSv8i16_indexed_OP1,
  143. FMLSv8i16_indexed_OP2,
  144. FMLSv2i32_indexed_OP1,
  145. FMLSv2i32_indexed_OP2,
  146. FMLSv2i64_indexed_OP1,
  147. FMLSv2i64_indexed_OP2,
  148. FMLSv4f32_OP1,
  149. FMLSv4f32_OP2,
  150. FMLSv4i32_indexed_OP1,
  151. FMLSv4i32_indexed_OP2,
  152. FMULv2i32_indexed_OP1,
  153. FMULv2i32_indexed_OP2,
  154. FMULv2i64_indexed_OP1,
  155. FMULv2i64_indexed_OP2,
  156. FMULv4i16_indexed_OP1,
  157. FMULv4i16_indexed_OP2,
  158. FMULv4i32_indexed_OP1,
  159. FMULv4i32_indexed_OP2,
  160. FMULv8i16_indexed_OP1,
  161. FMULv8i16_indexed_OP2,
  162. };
  163. } // end namespace llvm
  164. #endif
  165. #ifdef __GNUC__
  166. #pragma GCC diagnostic pop
  167. #endif