[InstCombine] add tests for udiv with common factor; NFC
authorSanjay Patel <spatel@rotateright.com>
Thu, 26 Jul 2018 16:14:53 +0000 (16:14 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 26 Jul 2018 16:14:53 +0000 (16:14 +0000)
commitb381e7e59a182c418c44cea54c127ec2366a40d2
treeb2a3bdd3fffaf65517feca02809edbb3f5832bc3
parent1d5e640428b18b6e2c600dc8e566943004ad6dd9
[InstCombine] add tests for udiv with common factor; NFC

This fold is mentioned in PR38239:
https://bugs.llvm.org/show_bug.cgi?id=38239

The general case probably belongs in -reassociate, but given that we do
basic reassociation optimizations similar to this in instcombine already,
we might as well be consistent within instcombine and handle this pattern?

llvm-svn: 338038
llvm/test/Transforms/InstCombine/div.ll