llvm-6502/lib/CodeGen/SelectionDAG
Benjamin Kramer 8c06aa1c59 Lower the i8 extension in memset to a multiply instead of a potentially long series of shifts and ors.
We could implement a DAGCombine to turn x * 0x0101 back into logic operations
on targets that doesn't support the multiply or it is slow (p4) if someone cares
enough.

Example code:
  void test(char *s, int a) {
      __builtin_memset(s, a, 4);
  }
before:
  _test:                                  ## @test
    movzbl  8(%esp), %eax
    movl  %eax, %ecx
    shll  $8, %ecx
    orl %eax, %ecx
    movl  %ecx, %eax
    shll  $16, %eax
    orl %ecx, %eax
    movl  4(%esp), %ecx
    movl  %eax, 4(%ecx)
    movl  %eax, (%ecx)
    ret
after:
  _test:                                  ## @test
    movzbl  8(%esp), %eax
    imull $16843009, %eax, %eax   ## imm = 0x1010101
    movl  4(%esp), %ecx
    movl  %eax, 4(%ecx)
    movl  %eax, (%ecx)
    ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122707 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-02 19:44:58 +00:00
..
CMakeLists.txt Removed a bunch of unnecessary target_link_libraries. 2010-09-28 22:39:14 +00:00
DAGCombiner.cpp DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is illegal. The latter usually compiles into smaller code. 2010-12-22 23:17:45 +00:00
FastISel.cpp If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
FunctionLoweringInfo.cpp Reapply r112623. Included additional check for unused byval argument. 2010-08-31 22:22:42 +00:00
InstrEmitter.cpp flags -> glue for selectiondag 2010-12-23 17:24:32 +00:00
InstrEmitter.h
LegalizeDAG.cpp Fix indentation, add comment. 2010-12-21 17:16:58 +00:00
LegalizeFloatTypes.cpp PR5207: Rename overloaded APInt methods set(), clear(), flip() to 2010-12-01 08:53:58 +00:00
LegalizeIntegerTypes.cpp rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for 2010-12-21 02:38:05 +00:00
LegalizeTypes.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeTypes.h Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeTypesGeneric.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeVectorOps.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeVectorTypes.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
Makefile
ScheduleDAGFast.cpp flags -> glue for selectiondag 2010-12-23 17:24:32 +00:00
ScheduleDAGList.cpp Various bits of framework needed for precise machine-level selection 2010-12-24 05:03:26 +00:00
ScheduleDAGRRList.cpp Minor cleanup related to my latest scheduler changes. 2010-12-24 07:10:19 +00:00
ScheduleDAGSDNodes.cpp flags -> glue for selectiondag 2010-12-23 17:24:32 +00:00
ScheduleDAGSDNodes.h rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for 2010-12-21 02:38:05 +00:00
SDNodeDbgValue.h Merge System into Support. 2010-11-29 18:16:10 +00:00
SDNodeOrdering.h
SelectionDAG.cpp Lower the i8 extension in memset to a multiply instead of a potentially long series of shifts and ors. 2011-01-02 19:44:58 +00:00
SelectionDAGBuilder.cpp rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for 2010-12-21 02:38:05 +00:00
SelectionDAGBuilder.h When isel is emitting instructions for an x86 target without CMOV, the CFG is 2010-09-30 19:44:31 +00:00
SelectionDAGISel.cpp Various bits of framework needed for precise machine-level selection 2010-12-24 05:03:26 +00:00
SelectionDAGPrinter.cpp flags -> glue for selectiondag 2010-12-23 17:24:32 +00:00
TargetLowering.cpp Add missing standard headers. Patch by Joerg Sonnenberger! 2010-12-19 20:43:38 +00:00
TargetSelectionDAGInfo.cpp