llvm-capstone/llvm/lib
Craig Topper f14e62c9a5 [EarlyCSE] Improve EarlyCSE of some absolute value cases.
Change matchSelectPattern to return X and -X for ABS/NABS in a well defined order. Adjust EarlyCSE to account for this. Ensure the SPF result is some kind of min/max and not abs/nabs in one place in InstCombine that made me nervous.

Prevously we returned the two operands of the compare part of the abs pattern. The RHS is always going to be a 0i, 1 or -1 constant. This isn't a very meaningful thing to return for any one. There's also some freedom in the abs pattern as to what happens when the value is equal to 0. This freedom led to early cse failing to match when different constants were used in otherwise equivalent operations. By returning the input and its negation in a defined order we can ensure an exact match. This also makes sure both patterns use the exact same subtract instruction for the negation. I believe CSE should evebntually make this happen and properly merge the nsw/nuw flags. But I'm not familiar with CSE and what order it does things in so it seemed like it might be good to really enforce that they were the same.

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

llvm-svn: 332865
2018-05-21 18:42:42 +00:00
..
Analysis [EarlyCSE] Improve EarlyCSE of some absolute value cases. 2018-05-21 18:42:42 +00:00
AsmParser [STLExtras] Add distance() for ranges, pred_size(), and succ_size() 2018-05-10 23:01:54 +00:00
BinaryFormat [WebAssembly] Move toString helpers to BinaryFormat 2018-05-14 22:42:07 +00:00
Bitcode [STLExtras] Add distance() for ranges, pred_size(), and succ_size() 2018-05-10 23:01:54 +00:00
CodeGen [GlobalMerge] Exit early if only one global is to be merged 2018-05-19 18:00:02 +00:00
DebugInfo [DWARF] Refactor callback usage for .debug_line error handling 2018-05-21 15:30:54 +00:00
Demangle [demangler] Add a partial demangling API for LLDB. 2018-04-12 20:41:38 +00:00
ExecutionEngine [ORC] Consolidate materialization errors, and generate them in VSO's 2018-05-17 20:48:58 +00:00
Fuzzer
FuzzMutate
IR [LLVM-C] Add DIBuilder Bindings For ObjC Classes 2018-05-21 16:27:35 +00:00
IRReader
LineEditor
Linker
LTO Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MC MC: Remove stream and output functions from MCObjectWriter. NFCI. 2018-05-21 18:28:57 +00:00
Object [WebAssembly] Object: Add more error checking for object file reading 2018-05-18 21:08:26 +00:00
ObjectYAML Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." 2018-05-17 22:55:15 +00:00
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ProfileData Support: Simplify endian stream interface. NFCI. 2018-05-18 19:46:24 +00:00
Support Revert 332750, llvm part (see comment on D46910). 2018-05-20 23:03:17 +00:00
TableGen Revert r330742: Let TableGen write output only if it changed, instead of doing so in cmake. 2018-05-07 23:41:48 +00:00
Target [AMDGPU] Add divergence analysis as a dependency for ISel 2018-05-21 18:18:52 +00:00
Testing [LLVMTestingSupport] Add explicit linkage to LLVMSupport 2018-04-08 06:49:17 +00:00
ToolDrivers [COFF] Improve correctness of def parsing for GNU features 2018-05-09 09:21:53 +00:00
Transforms [EarlyCSE] Improve EarlyCSE of some absolute value cases. 2018-05-21 18:42:42 +00:00
WindowsManifest Convert line endings of lib/WindowsManifest/CMakeLists.txt to unix. 2018-04-07 04:28:08 +00:00
XRay
CMakeLists.txt
LLVMBuild.txt