[PATCH] D118147: [AArch64][SVE] Folds VSELECT if the predicate is all active.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 06:24:20 PST 2022


sdesmalen marked 2 inline comments as done.
sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:15112
+          getNumElementsFromSVEPredPattern(N.getConstantOperandVal(0));
+      return PatNumElts == NumElts * VScale;
+    }
----------------
david-arm wrote:
> david-arm wrote:
> > nit: Maybe this is just personal preference, but I think these types of comparisons are a bit easier to read with (), i.e. `PatNumElts == (NumElts * VScale)`.
> It looks like we can also support the case where PatNumElts > (NumElts * VScale) as well, right?
I wasn't sure if this case would be considered a bug, because if you run for a VL16 on a machine where only VL8 would be legal, then the rest of the code may be wrong as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118147



More information about the llvm-commits mailing list