OSDN Git Service

[Hexagon] Couple of fixes in optimize addressing mode
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 10 Dec 2018 21:56:04 +0000 (21:56 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 10 Dec 2018 21:56:04 +0000 (21:56 +0000)
commitdec8ce2db26495711c0c3d923d9a282dab0ba71c
tree983ee2fa3aa13e90e8a37eaf4a7173b02b66efb6
parenta71d0d5fdc6a44687e1ab8121ba47261b843c1d3
[Hexagon] Couple of fixes in optimize addressing mode

- Check if an operand is an immediate before calling getImm. Some operands
  that take constant values can actually have global symbols or other
  constant expressions.
- When a load-constant instruction can be folded into users, make sure to
  only delete it when all users have been successfully converted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348802 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonOptAddrMode.cpp
test/CodeGen/Hexagon/addrmode-immop.mir [new file with mode: 0644]