diff options
author | James Molloy <james.molloy@arm.com> | 2016-10-05 14:52:13 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2016-10-05 14:52:13 +0000 |
commit | b7de497cb9f0cc92a6936800a656b339cea7eedb (patch) | |
tree | 9b4887007e260863c830346b63486ce5a4a69326 /llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | |
parent | 8449b238eab2428663507b51e4d9d9fcf5017783 (diff) | |
download | bcm5719-llvm-b7de497cb9f0cc92a6936800a656b339cea7eedb.tar.gz bcm5719-llvm-b7de497cb9f0cc92a6936800a656b339cea7eedb.zip |
[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.
llvm-svn: 283323
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index 6eb4d463965..d818030be33 100644 --- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -1188,6 +1188,7 @@ ARMDAGToDAGISel::SelectThumbAddrModeImm5S(SDValue N, unsigned Scale, } else if (N.getOpcode() == ARMISD::Wrapper && N.getOperand(0).getOpcode() != ISD::TargetGlobalAddress && N.getOperand(0).getOpcode() != ISD::TargetExternalSymbol && + N.getOperand(0).getOpcode() != ISD::TargetConstantPool && N.getOperand(0).getOpcode() != ISD::TargetGlobalTLSAddress) { Base = N.getOperand(0); } else { |