[PATCH] D52285: [SelectionDAG] replace duplicated peekThroughBitcast helper functions; NFCI

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 17:20:55 PDT 2018


spatel created this revision.
spatel added reviewers: craig.topper, RKSimon.
Herald added a subscriber: mcrosier.

x86 had 2 versions of peekThroughBitcast. DAGCombiner had 1. Plus, it had a 1-off implementation for the one-use variant.
The new code mimics the IR version where we have an optional param if the one-use constraint is requested. No functional change intended.

I'm proposing to put this next to isBitwiseNot() because I am planning to use it in there. Another option is next to the helpers in the ISD namespace (eg, ISD::isConstantSplatVector()). But if there's no good reason for those to be there, I'd prefer to pull everything over here if possible.


https://reviews.llvm.org/D52285

Files:
  include/llvm/CodeGen/SelectionDAGNodes.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52285.166199.patch
Type: text/x-patch
Size: 11767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180920/ef00c600/attachment.bin>


More information about the llvm-commits mailing list