[llvm] r313891 - [DAGCombiner] Remove duplicate code from visitZERO_EXTEND
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 10:30:02 PDT 2017
Author: ctopper
Date: Thu Sep 21 10:30:02 2017
New Revision: 313891
URL: http://llvm.org/viewvc/llvm-project?rev=313891&view=rev
Log:
[DAGCombiner] Remove duplicate code from visitZERO_EXTEND
This exact block of code exists right below.
Differential Revision: https://reviews.llvm.org/D38122
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=313891&r1=313890&r2=313891&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Sep 21 10:30:02 2017
@@ -7558,20 +7558,6 @@ SDValue DAGCombiner::visitZERO_EXTEND(SD
return DAG.getZExtOrTrunc(Op, SDLoc(N), VT);
}
- // fold (zext (truncate (load x))) -> (zext (smaller load x))
- // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n)))
- if (N0.getOpcode() == ISD::TRUNCATE) {
- if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) {
- SDNode *oye = N0.getOperand(0).getNode();
- if (NarrowLoad.getNode() != N0.getNode()) {
- CombineTo(N0.getNode(), NarrowLoad);
- // CombineTo deleted the truncate, if needed, but not what's under it.
- AddToWorklist(oye);
- }
- return SDValue(N, 0); // Return N so it doesn't get rechecked!
- }
- }
-
// fold (zext (truncate x)) -> (and x, mask)
if (N0.getOpcode() == ISD::TRUNCATE) {
// fold (zext (truncate (load x))) -> (zext (smaller load x))
More information about the llvm-commits
mailing list