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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to