llvm-project/llvm/lib
Sanjay Patel a003c728a5 [InstCombine] choose 1 form of abs and nabs as canonical
We already do this for min/max (see the blob above the diff), 
so we should do the same for abs/nabs.
A sign-bit check (<s 0) is used as a predicate for other IR 
transforms and it's likely the best for codegen.

This might solve the motivating cases for D47037 and D47041, 
but I think those patches still make sense. We can't guarantee 
this canonicalization if the icmp has more than one use.

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

llvm-svn: 332819
2018-05-20 14:23:23 +00:00
..
Analysis Propagate nonnull and dereferenceable throught launder 2018-05-18 23:54:33 +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 Fixing buildbot error introduced with r332759. 2018-05-18 21:44:28 +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
FuzzMutate [llvm-opt-fuzzer] Add irce to the fuzzing options 2018-03-20 11:32:13 +00:00
Fuzzer
IR [LLVM-C] Use Length-Providing Value Name Getters and Setters 2018-05-19 15:08:36 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LTO Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LineEditor
Linker [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
MC Support: Simplify endian stream interface. NFCI. 2018-05-18 19:46:24 +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 [Support] Avoid normalization in sys::getDefaultTargetTriple 2018-05-18 18:33:07 +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 Fix MSVC unused variable warning. NFCI. 2018-05-19 12:46:02 +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 [InstCombine] choose 1 form of abs and nabs as canonical 2018-05-20 14:23:23 +00:00
WindowsManifest Convert line endings of lib/WindowsManifest/CMakeLists.txt to unix. 2018-04-07 04:28:08 +00:00
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt
LLVMBuild.txt