diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-03-12 23:29:01 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-12 23:29:01 +0000 |
| commit | b9dce9db85b05367b8176b2a88cb9198dca811df (patch) | |
| tree | c2c118d060f995671d77e58e70a7306eee31075a /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
| parent | 3ab7ea79657b31de97ce500926f12bfef4ef93a7 (diff) | |
| download | bcm5719-llvm-b9dce9db85b05367b8176b2a88cb9198dca811df.tar.gz bcm5719-llvm-b9dce9db85b05367b8176b2a88cb9198dca811df.zip | |
More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
llvm-svn: 35074
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index b11b1f79b4e..5e6e8004c7d 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -3152,8 +3152,9 @@ isOperandValidForConstraint(SDOperand Op, char Letter, SelectionDAG &DAG) { } /// isLegalAddressImmediate - Return true if the integer value can be used -/// as the offset of the target addressing mode. -bool PPCTargetLowering::isLegalAddressImmediate(int64_t V) const { +/// as the offset of the target addressing mode for load / store of the +/// given type. +bool PPCTargetLowering::isLegalAddressImmediate(int64_t V,const Type *Ty) const{ // PPC allows a sign-extended 16-bit immediate field. return (V > -(1 << 16) && V < (1 << 16)-1); } |

