mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Treat TargetGlobalAddress as a constant for the purpose of matching pre-inc stores on PPC.
Thanks to Tobias von Koch for pointing out this problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,7 +111,8 @@ namespace {
|
||||
/// immediate field. Because preinc imms have already been validated, just
|
||||
/// accept it.
|
||||
bool SelectAddrImmOffs(SDValue N, SDValue &Out) const {
|
||||
if (isa<ConstantSDNode>(N)) {
|
||||
if (isa<ConstantSDNode>(N) || N.getOpcode() == PPCISD::Lo ||
|
||||
N.getOpcode() == ISD::TargetGlobalAddress) {
|
||||
Out = N;
|
||||
return true;
|
||||
}
|
||||
@@ -123,6 +124,10 @@ namespace {
|
||||
/// index field. Because preinc imms have already been validated, just
|
||||
/// accept it.
|
||||
bool SelectAddrIdxOffs(SDValue N, SDValue &Out) const {
|
||||
if (isa<ConstantSDNode>(N) || N.getOpcode() == PPCISD::Lo ||
|
||||
N.getOpcode() == ISD::TargetGlobalAddress)
|
||||
return false;
|
||||
|
||||
Out = N;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user