llvm-project/llvm/test
Nikita Popov fe79061be2 [LVI][CVP] Use block value when simplifying icmps
Add a flag to getPredicateAt() that allows making use of the block
value. This allows us to take into account range information from
the current block, rather than only information that is threaded
over edges, making the icmp simplification in CVP a lot more
powerful.

I'm not changing getPredicateAt() to use the block value
unconditionally to avoid any impact on the JumpThreading pass,
which is somewhat picky about LVI query order.

Most test changes here are just icmps that now get dropped (while
previously only a result used in a return was replaced). The three
tests in icmp.ll show some representative improvements. Some of
the folds this enables have been covered by IPSCCP in the meantime,
but LVI can reason about some cases which are hard to support in
IPSCCP, such as in test_br_cmp_with_offset.

The compile-time time cost of doing this is fairly minimal, with
a ~0.05% CTMark regression for ReleaseThinLTO:
https://llvm-compile-time-tracker.com/compare.php?from=709d03f8af4da4204849a70f01798e7cebba2e32&to=6236fd503761f43c99f4537121e057a01056f185&stat=instructions

This is because the block values will typically already be queried
and cached by other CVP optimizations anyway.

Differential Revision: https://reviews.llvm.org/D69686
2020-09-27 20:25:16 +02:00
..
Analysis [CostModel] add cl option to check size and latency costs; NFC 2020-09-27 09:52:56 -04:00
Assembler OpaquePtr: Add type to sret attribute 2020-09-25 14:07:30 -04:00
Bindings C API: functions to get mask of a ShuffleVector 2020-09-25 16:01:05 -07:00
Bitcode OpaquePtr: Add type to sret attribute 2020-09-25 14:07:30 -04:00
BugPoint [Bugpoint][NewPM] Pin bugpoint to legacy PM 2020-09-15 11:29:10 -07:00
CodeGen [X86] Add some basic i128 udiv test coverage 2020-09-27 16:00:15 +01:00
DebugInfo Add a verifier check that rejects non-distinct DISubprogram function 2020-09-25 12:04:46 -07:00
Demangle
Examples
ExecutionEngine
Feature [DIE] Remove DeadInstEliminationPass 2020-09-21 12:12:25 -07:00
FileCheck
Instrumentation [CGProfile] don't emit cgprofile entry if called function is dllimport 2020-09-23 16:56:54 -07:00
Integer
JitListener
LTO [ThinLTO] add post-thinlto-merge option to -lto-embed-bitcode 2020-09-15 15:56:11 -07:00
Linker
MC [PowerPC] Add accumulator register class and instructions 2020-09-25 12:25:13 -05:00
MachineVerifier
Object [Object/yaml2obj/obj2yaml][test] - Split, cleanup and move MIPS abi-flags.yaml test. NFCI. 2020-09-25 12:04:55 +03:00
ObjectYAML [DWARFYAML][test] Simplify __debug_pubnames/types tests. NFC. 2020-09-23 08:42:54 +08:00
Other Revert "[DSE] Switch to MemorySSA-backed DSE by default." 2020-09-26 18:35:27 +01:00
Reduce
SafepointIRVerifier
Support
SymbolRewriter
TableGen Enhance TableGen so that backends can produce better error messages. 2020-09-23 13:35:32 -04:00
ThinLTO/X86 Revert D87970 "[ThinLTO] Avoid temporaries when loading global decl attachment metadata" 2020-09-23 10:24:08 -07:00
Transforms [LVI][CVP] Use block value when simplifying icmps 2020-09-27 20:25:16 +02:00
Unit
Verifier Add a verifier check that rejects non-distinct DISubprogram function 2020-09-25 12:04:46 -07:00
YAMLParser
tools Revert "[IRSim] Adding basic implementation of llvm-sim." 2020-09-25 16:18:48 -05:00
.clang-format
CMakeLists.txt [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
TestRunner.sh
lit.cfg.py [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
lit.site.cfg.py.in Disable a large test for EXPENSIVE_CHECKS and debug build 2020-09-16 21:57:34 +00:00