[PATCH] D80320: [AARCH64][NEON] Allow to sink operands of aarch64_neon_pmull64.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 16:00:52 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9403
+static bool isOperandOfVmullHighP64(Value *Op) {
+  ExtractElementInst *ExtInstr = dyn_cast_or_null<ExtractElementInst>(Op);
+  if (!ExtInstr)
----------------
Op can't be null.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9408
+  if (ConstantInt *CI = dyn_cast<ConstantInt>(ExtInstr->getIndexOperand()))
+    if (CI->getZExtValue() != 1)
+      return false;
----------------
`CI->getValue()`


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9411
+
+  if (ExtInstr->getVectorOperandType()->getNumElements() != 2)
+    return false;
----------------
VectorType::getNumElements() is deprecated; please dyn_cast<> to FixedVectorType.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9416
+          ->getPrimitiveSizeInBits()
+          .getFixedSize() != 128)
+    return false;
----------------
The check for the size is redundant; a two-element vector with i64 elements must be a 128-bit vector.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9445
+    case Intrinsic::aarch64_neon_pmull64:
+      if (!areOperandsOfVmullHighP64(II->getOperandUse(0),
+                                     II->getOperandUse(1)))
----------------
getArgOperand()


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80320/new/

https://reviews.llvm.org/D80320





More information about the llvm-commits mailing list