3 ms·
It looks like LLVM trunk still uses a subtraction and a shift for "uncooperative" divisors: https://github.com/llvm-mirror/llvm/blob/1bdc6c4519d9ad254b20534a166
by simonster 12y ago
It 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...