llvm-project/llvm/test
Andrea Di Biagio b08862c4f0 [TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target.
Now that SimplifyCFG uses TTI for the cost heuristic, we can teach BasicTTIImpl
how to query TLI in order to get a more accurate cost for truncates and
zero-extends.

Before this patch, the basic cost heuristic in TargetTransformInfoImplCRTPBase
would have conservatively returned a 'default' TCC_Basic for all zero-extends,
and TCC_Free for truncates on native types.

This patch improves the heuristic so that we query TLI (if available) to get
more accurate answers. If TLI is available, then methods 'isZExtFree' and
'isTruncateFree' can be used to check if a zext/trunc is free for the target.

Added more test cases to SimplifyCFG/X86/speculate-cttz-ctlz.ll.
With this change, SimplifyCFG is now able to speculate a 'cheap' cttz/ctlz
immediately followed by a free zext/trunc.

Differential Revision: http://reviews.llvm.org/D7585

llvm-svn: 228923
2015-02-12 14:17:24 +00:00
..
Analysis Fixed a bug where CFLAA would crash the compiler. 2015-02-12 03:07:07 +00:00
Assembler AsmParser: Validate alloca's type 2015-02-11 09:13:11 +00:00
Bindings [OCaml] Add Llvm.build_empty_phi. 2015-02-06 13:42:03 +00:00
Bitcode Check bit widths before trying to get a type. 2015-01-30 18:13:50 +00:00
BugPoint IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
CodeGen AVX-512: Fixed the "test" operation for i1 type 2015-02-12 08:40:34 +00:00
DebugInfo Add the missing testcase for r228764. 2015-02-10 23:32:56 +00:00
ExecutionEngine [Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to the 2015-02-02 19:51:18 +00:00
Feature Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
FileCheck
Instrumentation tsan: do not instrument not captured values 2015-02-12 09:55:28 +00:00
Integer
JitListener IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
LTO Introduce llvm/test/LTO/X86. LTO tests may be assumed as target-specific. 2015-01-30 10:09:26 +00:00
Linker Utils: Resolve cycles under distinct MDNodes 2015-02-04 19:44:34 +00:00
MC ARM: Fix another regression introduced in r223113 2015-02-12 13:37:28 +00:00
Object [ELFYAML] Provide default value 0 for YAML relocation addendum field 2015-01-29 06:56:24 +00:00
Other Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
SymbolRewriter SymbolRewriter: allow rewriting with comdats 2015-01-27 22:57:39 +00:00
TableGen
Transforms [TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target. 2015-02-12 14:17:24 +00:00
Unit
Verifier Verifier: Check for null operands in !llvm.module.flags 2015-02-11 09:13:06 +00:00
YAMLParser
tools Gold-plugin: Broaden scope of get/release_input_file to scope of Module. 2015-02-11 16:12:50 +00:00
.clang-format
CMakeLists.txt Revert r224149, llvm-dsymutil was already here. 2014-12-12 21:25:07 +00:00
Makefile [lit] Make config.llvm_lib_dir available on cmake, too. 2014-12-30 03:24:11 +00:00
Makefile.tests
TestRunner.sh
lit.cfg Remove a gross usage of environment variables in MachineVerifier, replacing it with support for setting the -verify-machineinstrs flag via an environment variable in LIT. 2015-02-04 00:02:59 +00:00
lit.site.cfg.in Reverting r226937: lit: Make MCJIT's supported arch check case insensitive 2015-01-24 01:42:44 +00:00