llvm/test
Sanjay Patel da103fa05e [ARM] add overrides for isCheapToSpeculateCttz() and isCheapToSpeculateCtlz()
ARM V6T2 has instructions for efficient count-leading/trailing-zeros, so this should be
considered a cheap operation (and therefore fair game for speculation) for any ARM V6T2
implementation.

The net result of allowing this speculation for the regression tests in this patch is
that we get this code:

ctlz:               
  clz  r0, r0
  bx  lr
cttz:              
  rbit  r0, r0
  clz  r0, r0
  bx  lr

Instead of:

ctlz:    
  cmp  r0, #0
  moveq  r0, #32
  clzne  r0, r0
  bx  lr
cttz:     
  cmp   r0, #0
  moveq  r0, #32
  rbitne  r0, r0
  clzne  r0, r0
  bx  lr

This will help solve a general speculation/despeculation problem noted in PR24818:
https://llvm.org/bugs/show_bug.cgi?id=24818

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252639 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 19:24:31 +00:00
..
Analysis Revert "Strip metadata when speculatively hoisting instructions" 2015-11-10 18:01:16 +00:00
Assembler
Bindings
Bitcode Add 'notail' marker for call instructions. 2015-11-06 23:55:38 +00:00
BugPoint
CodeGen [X86] Do not try to custom-lower sitofp/fptosi in soft-float mode 2015-11-10 17:37:49 +00:00
DebugInfo
Examples
ExecutionEngine [RuntimeDyld] Add support for R_X86_64_PC8 relocation. 2015-11-08 19:34:17 +00:00
Feature [FunctionAttrs] Add handling for operand bundles 2015-11-07 01:56:00 +00:00
FileCheck
Instrumentation
Integer
JitListener
LibDriver
Linker [ThinLTO] WeakAny fixes/cleanup 2015-11-10 18:20:11 +00:00
LTO llvm-lto: trivial spelling changes to distinguish custom diagnostic handler and 2015-11-10 18:52:48 +00:00
MC AVX512 : Implemented encoding and DAG lowering for VMOVHPS/PD and VMOVLPS/PD instructions. 2015-11-10 07:09:07 +00:00
Object
Other
SymbolRewriter
TableGen
tools Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match darwin’s nm(1). 2015-11-10 00:31:08 +00:00
Transforms [ARM] add overrides for isCheapToSpeculateCttz() and isCheapToSpeculateCtlz() 2015-11-10 19:24:31 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh