Don't claim the udiv created in BypassSlowDivision is exact.
authorJustin Lebar <jlebar@google.com>
Fri, 28 Oct 2016 21:43:51 +0000 (21:43 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 28 Oct 2016 21:43:51 +0000 (21:43 +0000)
commit468bf732096c813a76fbad0ab204b0cf7269f82a
treed549b65bdbaa974473d3b84f05ac2edba0b902b1
parentd66d37cbd96f3e69d4b764fd02c3d7d4e66ee7c3
Don't claim the udiv created in BypassSlowDivision is exact.

Summary:
In BypassSlowDivision's short-dividend path, we would create e.g.

  udiv exact i32 %a, %b

"exact" here means that we are asserting that %a is a multiple of %b.
But we have no reason to believe this must be true -- this is just a
bug, as far as I can tell.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 285459
llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-not-exact.ll [new file with mode: 0644]