[LoopIdiomRecognize] Add a test case showing a loop we turn into ctlz that we shouldn't.
authorCraig Topper <craig.topper@intel.com>
Wed, 11 Jul 2018 22:17:26 +0000 (22:17 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 11 Jul 2018 22:17:26 +0000 (22:17 +0000)
commitef08aec9352a4827a2f9c83fffd7844155b1a633
tree6606b92ae2a6d0bb7b94ee1a5455c0bae711d4c3
parent752ddbd0684a5173071ed22a7fa289a09e72d020
[LoopIdiomRecognize] Add a test case showing a loop we turn into ctlz that we shouldn't.

This loop executes one iteration without checking the input value. This produces a count of 1 for an input of 0 and 1. We are turning this into 32 - ctlz(n), but that returns 0 if n is 0.

llvm-svn: 336862
llvm/test/Transforms/LoopIdiom/X86/ctlz.ll