diff options
| author | Dan Gohman <gohman@apple.com> | 2011-11-03 21:49:52 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2011-11-03 21:49:52 +0000 |
| commit | 198b7ffc11020776e38e8800834785288086a0e9 (patch) | |
| tree | 089a642c76f0dd6375ed5cdb50d67f3e23e2add7 /llvm/lib/Target/XCore/XCoreISelLowering.cpp | |
| parent | cf0bca9e85f41933ab2ac389223dda3b0ff758a2 (diff) | |
| download | bcm5719-llvm-198b7ffc11020776e38e8800834785288086a0e9.tar.gz bcm5719-llvm-198b7ffc11020776e38e8800834785288086a0e9.zip | |
Reapply r143206, with fixes. Disallow physical register lifetimes
across calls, and only check for nested dependences on the special
call-sequence-resource register.
llvm-svn: 143660
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/XCore/XCoreISelLowering.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp index 2afe0e35afb..4b74f960474 100644 --- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp @@ -386,6 +386,15 @@ IsWordAlignedBasePlusConstantOffset(SDValue Addr, SDValue &AlignedBase, Offset = off; return true; } + // Check for an aligned global variable. + if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(*Root)) { + const GlobalValue *GV = GA->getGlobal(); + if (GA->getOffset() == 0 && GV->getAlignment() >= 4) { + AlignedBase = Base; + Offset = off; + return true; + } + } return false; } |

