diff options
author | Nirav Dave <niravd@google.com> | 2017-12-01 21:55:47 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-12-01 21:55:47 +0000 |
commit | 3e76e1e89e27d8015746a155301d57b0e3047849 (patch) | |
tree | 8f452f17cc94fade3417c9473f23cff07a797da0 /llvm/lib | |
parent | 3da7982cca9dde69213d2f47adc7981b6072ee31 (diff) | |
download | bcm5719-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')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 16 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.h | 3 |
2 files changed, 8 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"); } diff --git a/llvm/lib/Target/ARM/ARMISelLowering.h b/llvm/lib/Target/ARM/ARMISelLowering.h index a791e2ea233..01f101d5bd5 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.h +++ b/llvm/lib/Target/ARM/ARMISelLowering.h @@ -532,6 +532,9 @@ class VectorType; bool canCombineStoreAndExtract(Type *VectorTy, Value *Idx, unsigned &Cost) const override; + // Disable currently because of invalid merge. + bool mergeStoresAfterLegalization() const override { return false; } + bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT, const SelectionDAG &DAG) const override { // Do not merge to larger than i32. |