llvm-project/llvm/test
Andrea Di Biagio f807a6f297 [CodeGenPrepare] Improved logic to speculate calls to cttz/ctlz.
This patch improves the logic added at revision 224899 (see review D6728) that
teaches the backend when it is profitable to speculate calls to cttz/ctlz.

The original algorithm conservatively avoided speculating more than one
instruction from a basic block in a control flow grap modelling an if-statement.
In particular, the only allowed instruction (excluding the terminator) was a
call to cttz/ctlz. However, there are cases where we could be less conservative
and still be able to speculate a call to cttz/ctlz.

With this patch, CodeGenPrepare now tries to speculate a cttz/ctlz if the
result is zero extended/truncated in the same basic block, and the zext/trunc
instruction is "free" for the target.

Added new test cases to CodeGen/X86/cttz-ctlz.ll

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

llvm-svn: 225274
2015-01-06 17:41:18 +00:00
..
Analysis IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
Assembler DebugInfo: Update testcase to actually check something 2014-12-16 07:08:19 +00:00
Bindings [OCaml] Fix bitrot in tests. 2014-12-30 03:24:14 +00:00
Bitcode IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
BugPoint IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
CodeGen [CodeGenPrepare] Improved logic to speculate calls to cttz/ctlz. 2015-01-06 17:41:18 +00:00
DebugInfo Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-06 17:14:10 +00:00
ExecutionEngine Small model and JIT generally don't go well with each other. 2014-11-25 17:14:22 +00:00
Feature IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
FileCheck
Instrumentation [asan] simplify the tracing code, make it use the same guard variables as coverage 2015-01-03 00:54:43 +00:00
Integer
JitListener IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
LTO llvm-lto: Add testing coverage for local contexts 2014-12-17 02:00:38 +00:00
Linker Reapply "Linker: Drop superseded subprograms" 2014-12-18 01:05:33 +00:00
MC [Hexagon] Adding dealloc_return encoding and absolute address stores. 2015-01-06 16:15:15 +00:00
Object Don't loop endlessly for MachO files with 0 ncmds 2015-01-06 17:08:26 +00:00
Other [PM] Introduce a utility pass that preserves no analyses. 2015-01-06 09:06:35 +00:00
SymbolRewriter Transform: add SymbolRewriter pass 2014-11-07 21:32:08 +00:00
TableGen [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW. 2014-09-30 11:32:22 +00:00
Transforms Convert fcmp with 0.0 from casted integers to icmp 2015-01-06 15:50:59 +00:00
Unit
Verifier IR: Stop printing 'metadata' in Metadata::print() 2014-12-16 07:40:31 +00:00
YAMLParser
tools [dsymutil] Implement the BinaryHolder object and gain archive support. 2015-01-05 21:29:28 +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 llvm/test/lit.cfg: have_ld_plugin_support(): Use decode() for stdout. 2015-01-05 14:18:04 +00:00
lit.site.cfg.in [lit] Make config.llvm_lib_dir available on cmake, too. 2014-12-30 03:24:11 +00:00