llvm-project/llvm/lib
Roman Lebedev fbb2e40d5c [X86] X86DAGToDAGISel::matchBitExtract(): pattern c: truncation awareness
Summary:
The one thing of note here is that the 'bitwidth' constant (32/64) was previously pessimistic.
Given `x & (-1 >> (C - z))`, we were taking `C` to be `bitwidth(x)`, but in reality
we want `(-1 >> (C - z))` pattern to mean "low z bits must be all-ones".
And for that, `C` should be `bitwidth(-1 >> (C - z))`, i.e. of the shift operation itself.

Last pattern D does not seem to exhibit any of these truncation issues.
Although it has the opposite problem - if we extract low bits (no shift) from i64,
and then truncate to i32, then we fail to shrink this 64-bit extraction into 32-bit extraction.

Reviewers: RKSimon, craig.topper, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 364419
2019-06-26 12:19:47 +00:00
..
Analysis [HardwareLoops] NFC - move loop with irreducible control flow checking logic to HarewareLoopInfo. 2019-06-26 12:02:43 +00:00
AsmParser [SVE][IR] Scalable Vector IR Type with pr42210 fix 2019-06-18 10:11:56 +00:00
BinaryFormat [WebAssembly] Fix list of relocations with addends in lld 2019-06-26 00:52:42 +00:00
Bitcode [SVE][IR] Scalable Vector IR Type with pr42210 fix 2019-06-18 10:11:56 +00:00
CodeGen [X86] X86DAGToDAGISel::matchBitExtract(): pattern b: truncation awareness 2019-06-26 12:19:39 +00:00
DebugInfo llvm-symbolizer: Add a FRAME command. 2019-06-24 20:03:23 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine [JITLink] Move JITLinkMemoryManager into its own header. 2019-06-14 19:41:21 +00:00
FuzzMutate
Fuzzer
IR Dump what value failed byval attribute verification 2019-06-25 22:33:32 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO [Remarks] Extend -fsave-optimization-record to specify the format 2019-06-17 16:06:00 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
MC MC: correct the emission of weak aliases in COFF 2019-06-26 01:09:52 +00:00
MCA [MCA] Ignore invalid processor resource writes of zero cycles. NFCI 2019-06-14 13:31:21 +00:00
Object Share /machine: handling code with llvm-cvtres too 2019-06-12 11:32:43 +00:00
ObjectYAML AMDGPU/MC: Add .amdgpu_lds directive 2019-06-25 11:51:35 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs 2019-06-20 19:44:51 +00:00
ProfileData Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
Remarks [Remarks] Fix usage of enum class 2019-05-30 22:01:56 +00:00
Support DataExtractor: use decodeSLEB128 to implement getSLEB128 2019-06-24 23:45:18 +00:00
TableGen TableGen: Handle nontrivial foreach range bounds 2019-05-22 21:28:20 +00:00
Target [X86] X86DAGToDAGISel::matchBitExtract(): pattern c: truncation awareness 2019-06-26 12:19:47 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
ToolDrivers Share /machine: handling code with llvm-cvtres too 2019-06-12 11:32:43 +00:00
Transforms Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline." 2019-06-26 12:13:13 +00:00
WindowsManifest
XRay [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
CMakeLists.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
LLVMBuild.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00