[PATCH] D101062: [AArch64][SVE] Better utilisation of unpredicated forms of arithmetic intrinsics

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 03:31:27 PDT 2021


peterwaller-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13856
+  // Look through cast.
+  SDValue &Op = N;
+  while (Op.getOpcode() == AArch64ISD::REINTERPRET_CAST) {
----------------
sdesmalen wrote:
> peterwaller-arm wrote:
> > Potential surprise: because it's a ref, updating Op is going to update N. So, why not just update N in the first place, or avoid using a reference? Might be surprising behaviour - I'd expect that if you're using an extra variable, it's to preserve N's original value, which isn't happening here.
> or just make it a `const SDValue &Op` ?
Not sure I understand, If it were a const ref wouldn't that disallow updating it with `Op = Op.getOperand(0);`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101062



More information about the llvm-commits mailing list