[PATCH] D112464: [x86] limit vector increment fold to allow load folding

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 12:21:04 PDT 2021


spatel added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5053
   // because that would narrow the load, which isn't legal for volatiles.
   const LoadSDNode *Ld = dyn_cast<LoadSDNode>(Op.getNode());
   return !Ld->isVolatile() ||
----------------
craig.topper wrote:
> While you're in here, can you use `cast` here since the `dyn_cast` isn't checked for null.
Yes - I can do that as a 1-liner. Beyond that, I wasn't sure what cleanup we want to do.
Could update this group of 4 "MayFold*" functions together (pull the declarations into the header and X86 namespace even though there's no current external user of the other 3)?


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

https://reviews.llvm.org/D112464



More information about the llvm-commits mailing list