[X86] CombineOr - fold to generic funnel shifts
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 9 Feb 2019 20:34:59 +0000 (20:34 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 9 Feb 2019 20:34:59 +0000 (20:34 +0000)
commit6bf7b30b10f5c75c26617d183ade28558b4e3ffc
treef5234f0b698ade4d313a13163fedd26bc0646da2
parent586ad01fb68c793a766f10257fe2b2ddc2fba5dd
[X86] CombineOr - fold to generic funnel shifts

As discussed on D57389, this is a first step towards moving the SHLD/SHRD matching code to DAGCombiner using FSHL/FSHR instead.

There's a bit of work to do before I can do that, so this just folds to FSHL/FSHR in the existing code (handling the different SHRD/FSHR argument ordering), which fixes the issue we had with i16 shift amounts not being correctly masked.

llvm-svn: 353626
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/rot16.ll
llvm/test/CodeGen/X86/shift-double.ll