summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-02-08 06:27:18 +0000
committerCraig Topper <craig.topper@intel.com>2018-02-08 06:27:18 +0000
commitc19aed963e9eb4986f3c6cbec1bf08e63d56a367 (patch)
tree68db454698c4ccb72232e3be6001dcf6eb437d96 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent9b9d5274274353ba879aa84741acccda33dbf1cc (diff)
downloadbcm5719-llvm-c19aed963e9eb4986f3c6cbec1bf08e63d56a367.tar.gz
bcm5719-llvm-c19aed963e9eb4986f3c6cbec1bf08e63d56a367.zip
[DAGCombiner] Fix a couple mistakes from r324311 by really passing the original load to ExtendSetCCUses.
We're passing the binary op that uses the load instead of the load. Noticed by inspection. Not sure how to test this because this just prevents the introduction of an extend that will later be truncated and will probably be combined out. llvm-svn: 324568
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b6efa91bae4..9e7afed403d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7622,7 +7622,8 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
Mask = Mask.sext(VT.getSizeInBits());
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
ExtLoad, DAG.getConstant(Mask, DL, VT));
- ExtendSetCCUses(SetCCs, N0, ExtLoad, DL, ISD::SIGN_EXTEND);
+ ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, DL,
+ ISD::SIGN_EXTEND);
bool NoReplaceTruncAnd = !N0.hasOneUse();
bool NoReplaceTrunc = SDValue(LN00, 0).hasOneUse();
CombineTo(N, And);
@@ -7926,7 +7927,8 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
SDLoc DL(N);
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
ExtLoad, DAG.getConstant(Mask, DL, VT));
- ExtendSetCCUses(SetCCs, N0, ExtLoad, DL, ISD::ZERO_EXTEND);
+ ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, DL,
+ ISD::ZERO_EXTEND);
bool NoReplaceTruncAnd = !N0.hasOneUse();
bool NoReplaceTrunc = SDValue(LN00, 0).hasOneUse();
CombineTo(N, And);
OpenPOWER on IntegriCloud