summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-12-01 21:55:47 +0000
committerNirav Dave <niravd@google.com>2017-12-01 21:55:47 +0000
commit3e76e1e89e27d8015746a155301d57b0e3047849 (patch)
tree8f452f17cc94fade3417c9473f23cff07a797da0 /llvm/lib/CodeGen
parent3da7982cca9dde69213d2f47adc7981b6072ee31 (diff)
downloadbcm5719-llvm-3e76e1e89e27d8015746a155301d57b0e3047849.tar.gz
bcm5719-llvm-3e76e1e89e27d8015746a155301d57b0e3047849.zip
[DAG][ARM] Revert "Reenable post-legalize store merge"
due to failures in AArch and ARM code gen. llvm-svn: 319587
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2fa5d0a4a3a..439cbea44b5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -12621,10 +12621,9 @@ bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
ElementSizeBits),
SDLoc(CFP), IntMemVT);
else if (auto *C = dyn_cast<ConstantSDNode>(Val))
- Val = DAG.getConstant(C->getAPIntValue()
- .zextOrTrunc(Val.getValueSizeInBits())
- .zextOrTrunc(ElementSizeBits),
- SDLoc(C), IntMemVT);
+ Val = DAG.getConstant(
+ C->getAPIntValue().zextOrTrunc(ElementSizeBits),
+ SDLoc(C), IntMemVT);
}
// Make sure correctly size type is the correct type.
Val = DAG.getBitcast(MemVT, Val);
@@ -12687,14 +12686,9 @@ bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
SDValue Val = St->getValue();
StoreInt <<= ElementSizeBits;
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Val)) {
- StoreInt |= C->getAPIntValue()
- .zextOrTrunc(ElementSizeBits)
- .zextOrTrunc(SizeInBits);
+ StoreInt |= C->getAPIntValue().zextOrTrunc(SizeInBits);
} else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(Val)) {
- StoreInt |= C->getValueAPF()
- .bitcastToAPInt()
- .zextOrTrunc(ElementSizeBits)
- .zextOrTrunc(SizeInBits);
+ StoreInt |= C->getValueAPF().bitcastToAPInt().zextOrTrunc(SizeInBits);
} else {
llvm_unreachable("Invalid constant element type");
}
OpenPOWER on IntegriCloud