OSDN Git Service

[Hexagon] Handle non-aligned offsets in globals in extender optimization
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 30 Jan 2018 18:12:37 +0000 (18:12 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 30 Jan 2018 18:12:37 +0000 (18:12 +0000)
commit9e0fe7588b7481e01a29e0855be46240a0881021
tree38435a440a814030056b40ed8d5fb3c102cb23e7
parent216bd9526a634a740f21aa3606b525ef383aceaf
[Hexagon] Handle non-aligned offsets in globals in extender optimization

Instructions like memd(r0+##global+1) are legal as long as the entire
address is properly aligned. Assuming that "global" is aligned at an
8-byte boundary, the expression "global+1" appears to be misaligned.
Handle such cases in HexagonConstExtenders, and make sure that any non-
extended offsets generated are still aligned accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323799 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonConstExtenders.cpp
test/CodeGen/Hexagon/cext-opt-shifted-range.mir [new file with mode: 0644]