aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-09-12 17:40:25 +0000
committerCraig Topper <craig.topper@intel.com>2017-09-12 17:40:25 +0000
commit958106d0f16f9cf64769fc54e771cad371701d1e (patch)
tree6ffe1a8c2eab572d6763a3df024394702a181db7 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent57e8a2e5040a150b0d377bd2d1e9724b0df208c4 (diff)
downloadllvm-958106d0f16f9cf64769fc54e771cad371701d1e.zip
llvm-958106d0f16f9cf64769fc54e771cad371701d1e.tar.gz
llvm-958106d0f16f9cf64769fc54e771cad371701d1e.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions