[X86] Add example of 'zero shift' guards on rotation patterns (PR34924)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 3 Aug 2018 09:20:02 +0000 (09:20 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 3 Aug 2018 09:20:02 +0000 (09:20 +0000)
commit4014fb1049c1768727dfd546dfd84169810859e2
treefee3869d134cee3f6e370b3c3feed83209a833d7
parentdb887cab7a4df2c426aa5793eeb649db4942806c
[X86] Add example of 'zero shift' guards on rotation patterns (PR34924)

Basic pattern that leaves an unnecessary select on a rotation by zero result. This variant is trivial - the more general case with a compare+branch to prevent execution of undefined shifts is more tricky.

llvm-svn: 338833
llvm/test/CodeGen/X86/combine-rotates.ll