[llvm] [GlobalISel][AArch64] Legalize G_FABS and G_FNEG for SVE (PR #114784)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 22:21:39 PST 2024


================
@@ -179,3 +179,21 @@ def AArch64 : Target {
 //===----------------------------------------------------------------------===//
 
 include "AArch64PfmCounters.td"
+
+
+//===----------------------------------------------------------------------===//
+// GlobalISel patterns
+//===----------------------------------------------------------------------===//
+
+include "AArch64GlobalISelPatterns.td"
+
+// We want to first hit the instruction patterns.
+foreach VT = [nxv2bf16, nxv4bf16, nxv8bf16] in {
----------------
tschuett wrote:

I put the GlobalIsel include at the bottom of the file to minimize it's priority and don't bother others. It depends on AArch64SVEInstrInfo.td for the definition of the fabs and fneg instructions. At the same time, the and and xor patterns for fabs and fneg are defined in AArch64SVEInstrInfo.td. They have higher priority than my patterns.

https://github.com/llvm/llvm-project/pull/114784


More information about the llvm-commits mailing list