[all-commits] [llvm/llvm-project] 75a5fe: [SystemZ] Don't emit PC-relative memory accesses t...
Jonas Paulsson via All-commits
all-commits at lists.llvm.org
Tue Sep 29 05:53:59 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 75a5febe31cb2660c4f72d9745625704d29946e1
https://github.com/llvm/llvm-project/commit/75a5febe31cb2660c4f72d9745625704d29946e1
Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
Date: 2020-09-29 (Tue, 29 Sep 2020)
Changed paths:
M llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
M llvm/lib/Target/SystemZ/SystemZOperators.td
A llvm/test/CodeGen/SystemZ/int-move-10.ll
Log Message:
-----------
[SystemZ] Don't emit PC-relative memory accesses to unaligned symbols.
In the presence of packed structures (#pragma pack(1)) where elements are
referenced through pointers, there will be stores/loads with alignment values
matching the default alignments for the element types while the elements are
in fact unaligned. Strictly speaking this is incorrect source code, but is
unfortunately part of existing code and therefore now addressed.
This patch improves the pattern predicate for PC-relative loads and stores by
not only checking the alignment value of the instruction, but also making
sure that the symbol (and element) itself is aligned.
Fixes https://bugs.llvm.org/show_bug.cgi?id=44405
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D87510
More information about the All-commits
mailing list