aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-12-11 18:37:52 +0000
committerHal Finkel <hfinkel@anl.gov>2014-12-11 18:37:52 +0000
commit13d104bf78bb1098ab259f3165559c5ee0a5aea7 (patch)
tree41fdedb77cdb6295985db654e3a525a6af775d2e /llvm/lib/Support/CommandLine.cpp
parent256ecc3c2a75a1b15b9c8b35102c6687c1adc326 (diff)
downloadllvm-13d104bf78bb1098ab259f3165559c5ee0a5aea7.zip
llvm-13d104bf78bb1098ab259f3165559c5ee0a5aea7.tar.gz
llvm-13d104bf78bb1098ab259f3165559c5ee0a5aea7.tar.bz2
[PowerPC] Implement BuildSDIVPow2, lower i64 pow2 sdiv using sradi
PPCISelDAGToDAG contained existing code to lower i32 sdiv by a power-of-2 using srawi/addze, but did not implement the i64 case. DAGCombine now contains a callback specifically designed for this purpose (BuildSDIVPow2), and part of the logic has been moved to an implementation of that callback. Doing this lowering using BuildSDIVPow2 likely does not matter, compared to handling everything in PPCISelDAGToDAG, for the positive divisor case, but the negative divisor case, which generates an additional negation, can potentially benefit from additional folding from DAGCombine. Now, both the i32 and the i64 cases have been implemented. Fixes PR20732. llvm-svn: 224033
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions