llvm-project/llvm/test
Nick Lewycky 762f8a8549 Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B.
No matter what value you OR in to A, the result of (or A, B) is going to be UGE A. When A and B are positive, it's SGE too. If A is negative, OR'ing a value into it can't make it positive, but can increase its value closer to -1, therefore (or A, B) is SGE A. Working through all possible combinations produces this truth table:

```
A is
+, -, +/-
F  F   F   +    B is
T  F   ?   -
?  F   ?   +/-
```

The related optimizations are flipping the 'slt' for 'sge' which always NOTs the result (if the result is known), and swapping the LHS and RHS while swapping the comparison predicate.

There are more idioms left to implement (aren't there always!) but I've stopped here because any more would risk becoming unreasonable for reviewers.

llvm-svn: 266939
2016-04-21 00:53:14 +00:00
..
Analysis Port DemandedBits to the new pass manager. 2016-04-18 23:55:01 +00:00
Assembler [AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic. 2016-04-19 20:51:05 +00:00
Bindings [OCaml] Expose the LLVM diagnostic handler 2016-04-10 13:55:53 +00:00
Bitcode BitcodeWriter: Break recursion when enumerating Metadata, almost NFC 2016-04-19 03:46:51 +00:00
BugPoint [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
CodeGen [lanai] Add subword scheduling itineraries. 2016-04-20 18:28:55 +00:00
DebugInfo [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
Examples
ExecutionEngine Disable the new Orc lazy JIT tests on Windows, they do not pass 2016-02-10 18:46:42 +00:00
Feature [NVVM] Remove noduplicate attribute from synchronizing intrinsics. 2016-03-22 22:08:01 +00:00
FileCheck Reapply r262092: [FileCheck] Abort if -NOT is combined with another suffix. 2016-02-29 22:13:03 +00:00
Instrumentation Rename asan-check-lifetime into asan-stack-use-after-scope 2016-04-20 20:02:58 +00:00
Integer
JitListener [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LTO Refactor the InternalizePass into a helper class, and expose it through a public free function (NFC) 2016-04-13 05:25:08 +00:00
LibDriver LibDriver: Silently do nothing when provided no inputs. 2016-04-13 19:36:04 +00:00
Linker ThinLTO: never promote as external weak 2016-04-20 04:18:11 +00:00
MC [Hexagon] Fix handling of lcomm directive 2016-04-20 15:54:13 +00:00
Object Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message. 2016-04-20 21:24:34 +00:00
Other [CG] Add a new pass manager printer pass for the old call graph and 2016-03-10 11:24:11 +00:00
SymbolRewriter
TableGen Introduce a "patchable-function" function attribute 2016-04-19 05:24:47 +00:00
ThinLTO/X86 FunctionImport: make sure we always select the right callee in presence of alias 2016-04-20 04:17:36 +00:00
Transforms Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B. 2016-04-21 00:53:14 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00
Verifier [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
YAMLParser
tools Re-enable "[gold-plugin] Disable name for values other than GlobalValue" 2016-04-20 15:16:57 +00:00
.clang-format
CMakeLists.txt Moving llvm-test-depends and test-depends into the Tests folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE. 2016-04-12 15:09:14 +00:00
TestRunner.sh
lit.cfg test: Always treat .mir files as tests even outside of CodeGen/MIR 2016-04-04 21:23:44 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00