aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-10-22 14:12:44 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-10-22 14:12:44 +0000
commit898808504dcc2eb64a2962e40bb3096203d12d6b (patch)
treea759bc1e652abc7b2d17e57e7b69b73ebbce3a75 /llvm/lib/Support/SourceMgr.cpp
parent7efbd8daf4cbb911518a591186cc8fce87ab0c22 (diff)
downloadllvm-898808504dcc2eb64a2962e40bb3096203d12d6b.zip
llvm-898808504dcc2eb64a2962e40bb3096203d12d6b.tar.gz
llvm-898808504dcc2eb64a2962e40bb3096203d12d6b.tar.bz2
[X86] X86DAGToDAGISel: handle BZHI selection too, not just BEXTR.
Summary: As discussed in D52304 / IRC, we now have pattern matching for 'bit extract' in two places - tablegen and `X86DAGToDAGISel`. There are 4 patterns. And we will have a problem with `x & (-1 >> (32 - y))` pattern. * If the mask is one-use, then it is always unfolded into `x << (32 - y) >> (32 - y)` first. Thus, the existing test coverage is already broken. * If it is not one-use, then it is not unfolded, and is matched as BZHI. * If it is not one-use, we will not match it as BEXTR. And if it is one-use, it will have been unfolded already. So we will either not handle that pattern for BEXTR, or not have test coverage for it. This is bad. As discussed with @craig.topper, let's unify this matching, and do everything in `X86DAGToDAGISel`. Then we will not have code duplication, and will have proper test coverage. This indeed does not affect any tests, and this is great. It means that for these two patterns, the `X86DAGToDAGISel` is identical to the tablegen version. Please review carefully, i'm not fully sure about that intrinsic change, and introduction of the new `X86ISD` opcode. Reviewers: craig.topper, RKSimon, spatel Reviewed By: craig.topper Subscribers: llvm-commits, craig.topper Differential Revision: https://reviews.llvm.org/D53164 llvm-svn: 344904
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
0 files changed, 0 insertions, 0 deletions