OSDN Git Service

[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)
commit95bd49524cc067af783d2d765b4085939d5ddef0
tree2bc4265154b8ac56dc9523add0369f4db4a9097b
parent1dffdb8af4efa42341dcb8d7fda6523ab2619d97
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353626 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/rot16.ll
test/CodeGen/X86/shift-double.ll