[PATCH] D64295: [X86][AMDGPU] Add an out parameter to isLoadBitCastBeneficial/isStoreBitCastBeneficial to indicate we shouldn't both checking the alignment.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 09:42:17 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:405
+  virtual bool isLoadBitCastBeneficial(EVT LoadVT, EVT BitcastVT,
+                                       bool &CheckAlignment) const {
+    CheckAlignment = true;
----------------
craig.topper wrote:
> arsenm wrote:
> > It isn't clear to me what this does the name, so needs a better name? Also needs a documentation comment for it
> Do you have a better suggestion for a name? 'CallAllowsMemoryAccess'?
> 
> Or maybe I should just make isLoadBitCastBeneficial call the allowsMemoryAccess instead of DAGCombiner? Then X86 can control the behavior directly?
Calling allowsMemoryAccess directly would probably be better


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64295





More information about the llvm-commits mailing list