1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/test
Davide Italiano 3672dcbb24 [SimplifyLibCalls] Correctly set the is_zero_undef flag for llvm.cttz
If <src> is non-zero we can safely set the flag to true, and this
results in less code generated for, e.g. ffs(x) + 1 on FreeBSD.
Thanks to majnemer for suggesting the fix and reviewing.

Code generated before the patch was applied:


 0:   0f bc c7                bsf    %edi,%eax
 3:   b9 20 00 00 00          mov    $0x20,%ecx
 8:   0f 45 c8                cmovne %eax,%ecx
 b:   83 c1 02                add    $0x2,%ecx
 e:   b8 01 00 00 00          mov    $0x1,%eax
13:   85 ff                   test   %edi,%edi
15:   0f 45 c1                cmovne %ecx,%eax
18:   c3                      retq

Code generated after the patch was applied:

 0:   0f bc cf                bsf    %edi,%ecx
 3:   83 c1 02                add    $0x2,%ecx
 6:   85 ff                   test   %edi,%edi
 8:   b8 01 00 00 00          mov    $0x1,%eax
 d:   0f 45 c1                cmovne %ecx,%eax
10:   c3                      retq

It seems we can still use cmove and save another 'test' instruction, but
that can be tackled separately.

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

llvm-svn: 244947
2015-08-13 20:34:26 +00:00
..
Analysis Emit argmemonly attribute for intrinsics. 2015-08-13 17:40:04 +00:00
Assembler DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
Bindings [OCaml] Do not use -warn-error in tests. 2015-07-17 17:33:23 +00:00
Bitcode Emit argmemonly attribute for intrinsics. 2015-08-13 17:40:04 +00:00
BugPoint Fix typo in comment 2015-07-26 11:37:05 +00:00
CodeGen [X86][SSE] Tests for SMAX/SMIN/UMAX/UMIN vector instructions 2015-08-13 20:31:03 +00:00
DebugInfo Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE. 2015-08-11 21:36:45 +00:00
ExecutionEngine [mips][mcjit] Calculate correct addend for HI16 and PCHI16 reloc 2015-08-13 15:12:49 +00:00
Feature [IR] Verify EH pad predecessors 2015-08-11 02:48:30 +00:00
FileCheck
Instrumentation [libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72) 2015-08-11 00:24:39 +00:00
Integer
JitListener DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
Linker Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE. 2015-08-11 21:36:45 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC Scalar to vector conversions using direct moves 2015-08-13 17:40:44 +00:00
Object Add a test showing that objdump (and so ObjectFIle) can handle shndx. 2015-08-10 21:00:15 +00:00
Other Update test suite to make "ninja check" succeed without native backend builtin 2015-08-04 06:32:54 +00:00
SymbolRewriter
TableGen TableGen: Support folding casts from bits to int 2015-07-31 01:12:06 +00:00
tools Enable five passing dsymutil tests on Windows. 2015-08-11 06:05:27 +00:00
Transforms [SimplifyLibCalls] Correctly set the is_zero_undef flag for llvm.cttz 2015-08-13 20:34:26 +00:00
Unit
Verifier DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
YAMLParser
.clang-format
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.cfg Improve lit "native" feature to check if the native backend is builtin 2015-08-04 06:32:31 +00:00
lit.site.cfg.in Improve lit "native" feature to check if the native backend is builtin 2015-08-04 06:32:31 +00:00
Makefile
Makefile.tests
TestRunner.sh