3 ms·
From 2011, has this made it into gcc? Is it part of LLVM now since they tested with that?
by phkahler 12y ago
From 2011, has this made it into gcc? Is it part of LLVM now since they tested with that?
- simonster 12y agoIt looks like LLVM trunk still uses a subtraction and a shift for "uncooperative" divisors: https://github.com/llvm-mirror/llvm/blob/1bdc6c4519d9ad254b20534a1664f9d2809a95f1/lib/CodeGen/SelectionDAG/TargetLowering.cpp#L2751-L2766 https://github.com/llvm-mirror/llvm/blob/1bdc6c4519d9ad254b2...
- jevinskie 12y agoI found two other implementations of software division in LLVM: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Utils/IntegerDivision.cpp https://github.com/llvm-mirror/llvm/blob/master/lib/Transfor... https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Utils/BypassSlowDivision.cpp https://github.com/llvm-mirror/llvm/blob/master/lib/Transfor...