[PATCH] D108821: [Codegen][X86] EltsFromConsecutiveLoads(): if only have AVX1, ensure that the "load" is actually foldable (PR51615)

Alexander Kornienko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 10:09:07 PDT 2021


alexfh added a comment.

Thanks for the prompt fix! One nit.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5035
 
-static bool MayFoldLoad(SDValue Op) {
-  return Op.hasOneUse() && ISD::isNormalLoad(Op.getNode());
+static bool MayFoldLoad(SDValue Op, bool AssumeSingleUse = false) {
+  return (AssumeSingleUse || Op.hasOneUse()) && ISD::isNormalLoad(Op.getNode());
----------------
nit: "Function names should be verb phrases (as they represent actions), and command-like function should be imperative. The name should be camel case, and start with a lower case letter (e.g. openFile() or isFoo())."

https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

Same below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108821



More information about the llvm-commits mailing list