[llvm] [AArch64][GISel] Support neon.abs intrinsic for vector types (PR #107226)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 07:46:16 PST 2024


================
@@ -6644,6 +6644,34 @@ bool AArch64InstructionSelector::selectIntrinsic(MachineInstr &I,
   switch (IntrinID) {
   default:
     break;
+  case Intrinsic::aarch64_neon_abs: {
+    Register DstReg = I.getOperand(0).getReg();
+    Register SrcReg = I.getOperand(2).getReg();
+    auto SrcRegType = MRI.getType(SrcReg);
+    unsigned Opc = 0;
+
+    if (SrcRegType == LLT::fixed_vector(8, 8)) {
----------------
arsenm wrote:

This looks like it should be easily handled with patterns 

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


More information about the llvm-commits mailing list