[DAG] matchRotateSub - ensure the (pre-extended) shift amount is wide enough for...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 2 Aug 2022 10:38:47 +0000 (11:38 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 2 Aug 2022 10:38:52 +0000 (11:38 +0100)
commitb651fdff79027064071db7c1d0250553e3e6a232
tree9b849f494a18638599d039070ffa29d079ac95ce
parentb395c0f0cdbf60bb86cb30bd403ac82227d0f2da
[DAG] matchRotateSub - ensure the (pre-extended) shift amount is wide enough for the amount mask (PR56859)

matchRotateSub is given shift amounts that will already have stripped any/zero-extend nodes from - so make sure those values are wide enough to take a mask.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/rotate5.ll [new file with mode: 0644]