diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-10-21 00:02:42 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-10-21 00:02:42 +0000 |
commit | 4dd383120fb3432b72e6d00bfe9612ea5fdcc7cf (patch) | |
tree | dc1038d160a5345d37a27a48d366b5cb637be9da /llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | |
parent | a6a23b5874f6be69052f09b5b08c1394ac5f24ff (diff) | |
download | bcm5719-llvm-4dd383120fb3432b72e6d00bfe9612ea5fdcc7cf.tar.gz bcm5719-llvm-4dd383120fb3432b72e6d00bfe9612ea5fdcc7cf.zip |
Invert the TargetLowering flag that controls divide by consant expansion.
Add a new flag to TargetLowering indicating if the target has really cheap
signed division by powers of two, make ppc use it. This will probably go
away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.
llvm-svn: 23853
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 4813e9d369f..cc9e23c1cc6 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -996,6 +996,11 @@ SDOperand PPCDAGToDAGISel::Select(SDOperand Op) { return SDOperand(N, 0); } case ISD::SDIV: { + // FIXME: since this depends on the setting of the carry flag from the srawi + // we should really be making notes about that for the scheduler. + // FIXME: It sure would be nice if we could cheaply recognize the + // srl/add/sra pattern the dag combiner will generate for this as + // sra/addze rather than having to handle sdiv ourselves. oh well. unsigned Imm; if (isIntImmediate(N->getOperand(1), Imm)) { if ((signed)Imm > 0 && isPowerOf2_32(Imm)) { |