]> granicus.if.org Git - llvm/commit
[BypassSlowDivision] Improve our handling of divisions by constants
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 26 Sep 2017 21:54:27 +0000 (21:54 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 26 Sep 2017 21:54:27 +0000 (21:54 +0000)
commitc43cadab75b83b7bf58d501b8237faeca5a19c7d
tree6621660c889076917122269536b08e56b22c7976
parent07ef866ba830d2b40a44ec636a2d7f07262b36d7
[BypassSlowDivision] Improve our handling of divisions by constants

Summary:
Don't bail out on constant divisors for divisions that can be narrowed without
introducing control flow .  This gives us a 32 bit multiply instead of an
emulated 64 bit multiply in the generated PTX assembly.

Reviewers: jlebar

Subscribers: jholewinski, mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D38265

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/BypassSlowDivision.cpp
test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div.ll