OSDN Git Service

[Thumb] Don't try and emit LDRH/LDRB from the constant pool
authorJames Molloy <james.molloy@arm.com>
Wed, 5 Oct 2016 14:52:13 +0000 (14:52 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 5 Oct 2016 14:52:13 +0000 (14:52 +0000)
commit71beb002a1962525c0e895e81b7090ecf3865d00
tree4bc28405e3391d11cf3df7a3da5ebc06878eb452
parent471e2909de132e4c4b6d259b4b9e524d2f17fb58
[Thumb] Don't try and emit LDRH/LDRB from the constant pool

This is not a valid encoding - these instructions cannot do PC-relative addressing.

The underlying problem here is of whitelist in ARMISelDAGToDAG that unwraps ARMISD::Wrappers during addressing-mode selection. This didn't realise TargetConstantPool was actually possible, so didn't handle it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283323 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
test/CodeGen/ARM/constantpool-promote-ldrh.ll [new file with mode: 0644]