[PATCH] D87510: [SystemZ] Don't emit PC-relative memory accesses to unaligned (packed) symbols.
    Ulrich Weigand via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep 11 07:04:03 PDT 2020
    
    
  
uweigand added inline comments.
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp:1472
+
+  if (!SystemZISD::isPCREL(BasePtr.getOpcode()) ||
+      !MemAccess->getOffset().isUndef()) // potential index register
----------------
I don't think we need to check PCREL here, that should already be handled by the pattern (and has nothing to do with alignment, really).
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp:1476
+
+  // An access to GOT or constant pool is always aligned.
+  if (const PseudoSourceValue *PSV =
----------------
Well, there could still be an unaligned offset.  I think this check needs to be done after the offset check.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87510/new/
https://reviews.llvm.org/D87510
    
    
More information about the llvm-commits
mailing list