[llvm] [AArch64] Expand vector ops when NEON and SVE are unavailable. (PR #90833)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 06:20:01 PDT 2024


================
@@ -378,6 +378,27 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
     addQRTypeForNEON(MVT::v2i64);
     addQRTypeForNEON(MVT::v8f16);
     addQRTypeForNEON(MVT::v8bf16);
+  } else if (Subtarget->hasNEON() || Subtarget->useSVEForFixedLengthVectors()) {
+    addRegisterClass(MVT::v16i8, &AArch64::FPR8RegClass);
+    addRegisterClass(MVT::v8i16, &AArch64::FPR16RegClass);
+
+    addRegisterClass(MVT::v2f32, &AArch64::FPR64RegClass);
----------------
paulwalker-arm wrote:

I don't really like the duplication here.  What about passing `isNeonAvailable()` into `addDRTypeForNEON` and `addQRTypeForNEON` to toggle the call to `addTypeForNEON`?

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


More information about the llvm-commits mailing list