Go to file
Craig Topper 958106d0f1 [X86] Move matching of (and (srl/sra, C), (1<<C) - 1) to BEXTR/BEXTRI instruction to custom isel
Recognizing this pattern during DAG combine hides information about the 'and' and the shift from other combines. I think it should be recognized at isel so its as late as possible. But it can't be done with table based isel because you need to be able to look at both immediates. This patch moves it to custom isel in X86ISelDAGToDAG.cpp.

This does break a couple tests in tbm_patterns because we are now emitting an and_flag node or (cmp and, 0) that we dont' recognize yet. We already had this problem for several other TBM patterns so I think this fine and we can address of them together.

I've also fixed a bug where the combine to BEXTR was preventing us from using a trick of zero extending AH to handle extracts of bits 15:8. We might still want to use BEXTR if it enables load folding. But honestly I hope we narrowed the load instead before got to isel.

I think we should probably also support matching BEXTR from (srl/srl (and mask << C), C). But that should be a different patch.

Differential Revision: https://reviews.llvm.org/D37592

llvm-svn: 313054
2017-09-12 17:40:25 +00:00
clang Use the VFS from the CompilerInvocation by default 2017-09-12 16:54:53 +00:00
clang-tools-extra [clang-tidy] Implement type-based check for `gsl::owner` 2017-09-12 16:20:51 +00:00
compiler-rt [ubsan-minimal] Fix the x86_64h config check 2017-09-12 17:32:25 +00:00
debuginfo-tests Restrict debuginfo-tests to native configurations. 2017-09-08 17:10:48 +00:00
libclc integer: Add popcount implementation using ctpop intrinsic 2017-09-09 02:23:54 +00:00
libcxx Make pbump (internally) handle sizes bigger than MAX_INT. Fixes PR#33725 - thanks to Jonathan Wakely for the report 2017-09-12 15:00:43 +00:00
libcxxabi Revert "[libcxxabi] When built with ASan, __cxa_throw calls __asan_handle_no_return" 2017-09-06 03:00:42 +00:00
libunwind Revert r312240 2017-08-31 15:51:23 +00:00
lld Update comment. NFC. 2017-09-12 17:18:03 +00:00
lldb Plugins: fix resolution ambiguity in PDB plugin 2017-09-09 00:13:49 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [X86] Move matching of (and (srl/sra, C), (1<<C) - 1) to BEXTR/BEXTRI instruction to custom isel 2017-09-12 17:40:25 +00:00
openmp Read blocktime value set by kmp_set_blocktime() before reading from KMP_BLOCKTIME 2017-09-05 15:45:48 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Unroll and separate the remaining parts of isolation 2017-09-11 17:46:47 +00:00