[PATCH] D26357: [SelectionDAG] Add a signed integer absolute intrinsic

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 10:50:20 PST 2016


RKSimon created this revision.
RKSimon added reviewers: hfinkel, eli.friedman, jmolloy, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

This patch introduces a signed integer absolute intrinsic and ISD instruction.

Currently this is only setup for the X86 vector PABS* instructions but other targets should be able to make to use of this as well.

Further pattern matching may be added at the instcombine level in due course and the intrinsic enabled by default but at present the code is only used in the dagcombiner if the operation is legal/custom or the intrinsic is explicitly called.


Repository:
  rL LLVM

https://reviews.llvm.org/D26357

Files:
  docs/LangRef.rst
  include/llvm/CodeGen/ISDOpcodes.h
  include/llvm/IR/Intrinsics.td
  include/llvm/Target/TargetSelectionDAG.td
  lib/Analysis/ConstantFolding.cpp
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrSSE.td
  lib/Target/X86/X86IntrinsicsInfo.h
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/CodeGen/X86/combine-abs.ll
  test/CodeGen/X86/legalize-abs.ll
  test/CodeGen/X86/viabs.ll
  test/Transforms/InstCombine/abs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26357.77061.patch
Type: text/x-patch
Size: 63777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/37588409/attachment.bin>


More information about the llvm-commits mailing list