llvm-project/llvm/test
Sanjay Patel 3b0bafee63 [InstCombine] canonicalize min/max constant to select's false value
This is a first step towards canonicalization and improved folding/codegen
for integer min/max as discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html

Here, we're just matching the simplest min/max patterns and adjusting the
icmp predicate while swapping the select operands.

I've included FIXME tests in test/Transforms/InstCombine/select_meta.ll
so it's easier to see how this might be extended (corresponds to the TODO
comment in the code). That's also why I'm using matchSelectPattern()
rather than a simpler check; once the backend is patched, we can just 
remove some of the restrictions to allow the obfuscated min/max patterns
in the FIXME tests to be matched.

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

llvm-svn: 287585
2016-11-21 22:04:14 +00:00
..
Analysis Fix known zero bits for addrspacecast. 2016-11-21 15:42:31 +00:00
Assembler IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
Bindings [C API] Prevent nullptr dereferences in C API for counting attributes. 2016-11-15 22:19:59 +00:00
Bitcode Bitcode: Introduce initial multi-module reader API. 2016-11-16 21:44:45 +00:00
BugPoint Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
CodeGen [mips] Add tests for half precision floating point support. 2016-11-21 20:34:10 +00:00
DebugInfo [AsmPrinter] Enable codeview for windows-itanium 2016-11-21 20:13:32 +00:00
Examples
ExecutionEngine Make this test Windows-only (try to placate buildbots). 2016-11-03 16:43:10 +00:00
Feature
FileCheck
Instrumentation [asan] Make ASan compatible with linker dead stripping on Windows 2016-11-21 20:40:37 +00:00
Integer
JitListener
LTO Fix test from r287353: don't use /dev/null 2016-11-18 18:27:31 +00:00
LibDriver
Linker Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable. 2016-11-14 23:18:38 +00:00
MC [mips] seq macro support 2016-11-21 20:30:41 +00:00
Object [ELF] Convert ELF.h to Expected<T>. 2016-11-16 05:10:28 +00:00
ObjectYAML
Other Statistic/Timer: Include timers in PrintStatisticsJSON(). 2016-11-18 19:43:24 +00:00
SymbolRewriter
TableGen TableGen: Add operator !or 2016-11-15 06:49:28 +00:00
ThinLTO/X86 [ThinLTO] Fix crash when importing an opaque type 2016-11-19 18:44:16 +00:00
Transforms [InstCombine] canonicalize min/max constant to select's false value 2016-11-21 22:04:14 +00:00
Unit
Verifier Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace. 2016-10-05 22:15:37 +00:00
YAMLParser
tools [llvm-cov] Avoid 0% when reporting something that's 0/0 2016-11-21 14:00:04 +00:00
.clang-format
CMakeLists.txt [OCaml] Clear cross-target test deps when building out-of-tree 2016-11-12 14:58:30 +00:00
TestRunner.sh
lit.cfg test: synchronise lit substitutions 2016-11-13 19:37:00 +00:00
lit.site.cfg.in