[PATCH] D103082: [AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 12:26:06 PDT 2021


efriedma added a comment.

Can we add a few end-to-end tests of bool svdupq with constant operands to acle_sve_dupq.c?  The pattern matching to create ptrue seems a bit fragile, so I want to make sure we don't break it by accident.



================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:415
+  auto *DupXArg = dyn_cast<ConstantInt>(DupX->getArgOperand(0));
+  if (!DupXArg || DupXArg->getZExtValue() != 0)
+    return None;
----------------
isZero(). (Every time getZExtValue() is used somewhere, I have to think about whether the value might be wider than 64 bits, so please avoid where possible.)


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:435
+  // index zero
+  if (!dyn_cast<UndefValue>(VecIns->getArgOperand(0)))
+    return None;
----------------
isa<UndefValue>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103082



More information about the cfe-commits mailing list