llvm-6502/lib/CodeGen/SelectionDAG
Jim Grosbach 51a0280d29 DAG: Combine (and (setne X, 0), (setne X, -1)) -> (setuge (add X, 1), 2)
A common idiom is to use zero and all-ones as sentinal values and to
check for both in a single conditional ("x != 0 && x != (unsigned)-1").
That generates code, for i32, like:
  testl %edi, %edi
  setne %al
  cmpl  $-1, %edi
  setne %cl
  andb  %al, %cl

With this transform, we generate the simpler:
  incl  %edi
  cmpl  $1, %edi
  seta  %al

Similar improvements for other integer sizes and on other platforms. In
general, combining the two setcc instructions into one is better.

rdar://14689217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188315 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 21:30:58 +00:00
..
CMakeLists.txt
DAGCombiner.cpp DAG: Combine (and (setne X, 0), (setne X, -1)) -> (setuge (add X, 1), 2) 2013-08-13 21:30:58 +00:00
FastISel.cpp Un-break the buildbot by tweaking the indirection flag. 2013-07-10 01:53:37 +00:00
FunctionLoweringInfo.cpp Debug Info: clean up usage of Verify. 2013-06-28 05:43:10 +00:00
InstrEmitter.cpp Reapply an improved version of r180816/180817. 2013-07-09 20:28:37 +00:00
InstrEmitter.h Add -*- C++ -*- to InstrEmitter.h. 2013-07-17 18:53:29 +00:00
LegalizeDAG.cpp Add ISD::FROUND for libm round() 2013-08-07 22:49:12 +00:00
LegalizeFloatTypes.cpp Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void. 2013-08-13 17:54:56 +00:00
LegalizeIntegerTypes.cpp Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void. 2013-08-13 17:54:56 +00:00
LegalizeTypes.cpp Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void. 2013-08-13 17:54:56 +00:00
LegalizeTypes.h Add ISD::FROUND for libm round() 2013-08-07 22:49:12 +00:00
LegalizeTypesGeneric.cpp TargetLowering: Add getVectorIdxTy() function v2 2013-08-05 22:22:01 +00:00
LegalizeVectorOps.cpp Add ISD::FROUND for libm round() 2013-08-07 22:49:12 +00:00
LegalizeVectorTypes.cpp Add ISD::FROUND for libm round() 2013-08-07 22:49:12 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Cache the TargetLowering info object as a pointer. 2013-06-06 00:43:09 +00:00
ScheduleDAGFast.cpp Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. 2013-07-14 04:42:23 +00:00
ScheduleDAGRRList.cpp Add 'const' qualifier to some arrays. 2013-07-15 08:02:13 +00:00
ScheduleDAGSDNodes.cpp Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. 2013-07-14 04:42:23 +00:00
ScheduleDAGSDNodes.h Fix #includes, so we include only what we really need. 2013-02-20 00:26:25 +00:00
ScheduleDAGVLIW.cpp
SDNodeDbgValue.h
SelectionDAG.cpp Change asserts at the top of getVectorShuffle to check that LHS and RHS have the same type as the result. 2013-08-09 04:37:24 +00:00
SelectionDAGBuilder.cpp [SystemZ] Use CLC and IPM to implement memcmp 2013-08-12 10:28:10 +00:00
SelectionDAGBuilder.h Fixed SelectionDAGBuilder.h C++ filetype declaration to use the canonical C++ instead of c++. 2013-08-12 21:02:02 +00:00
SelectionDAGDumper.cpp Add ISD::FROUND for libm round() 2013-08-07 22:49:12 +00:00
SelectionDAGISel.cpp Reimplement isPotentiallyReachable to make nocapture deduction much stronger. 2013-07-27 01:24:00 +00:00
SelectionDAGPrinter.cpp
TargetLowering.cpp Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void. 2013-08-13 17:54:56 +00:00
TargetSelectionDAGInfo.cpp