diff options
| author | Craig Topper <craig.topper@intel.com> | 2019-06-23 07:00:46 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2019-06-23 07:00:46 +0000 |
| commit | 6ddc7912b0ec9e3b9c136a052dfe9530db74d3da (patch) | |
| tree | 3d336d5497423c8d3a68b28e2c841e9464a03143 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | cadd826d0af7a04e98963b08348a963b67e35882 (diff) | |
| download | bcm5719-llvm-6ddc7912b0ec9e3b9c136a052dfe9530db74d3da.tar.gz bcm5719-llvm-6ddc7912b0ec9e3b9c136a052dfe9530db74d3da.zip | |
[SelectionDAG] Remove the code that attempts to calculate the alignment for the second half of a split masked load/store.
The code divides the alignment by 2 if the original alignment is
equal to the original VT size. But this wouldn't be correct
if the alignment was larger than the VT size.
The memory operand object already takes care of calling MinAlign
on the base alignment and the memory pointer offset. So we don't
need any special code at all.
llvm-svn: 364151
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 68f6a1becae..83e5cc1c92c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8437,11 +8437,6 @@ SDValue DAGCombiner::visitMSTORE(SDNode *N) { EVT MemoryVT = MST->getMemoryVT(); unsigned Alignment = MST->getOriginalAlignment(); - // if Alignment is equal to the vector size, - // take the half of it for the second part - unsigned SecondHalfAlignment = - (Alignment == VT.getSizeInBits() / 8) ? Alignment / 2 : Alignment; - EVT LoMemVT, HiMemVT; std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT); @@ -8463,7 +8458,7 @@ SDValue DAGCombiner::visitMSTORE(SDNode *N) { MMO = DAG.getMachineFunction().getMachineMemOperand( MST->getPointerInfo().getWithOffset(HiOffset), - MachineMemOperand::MOStore, HiMemVT.getStoreSize(), SecondHalfAlignment, + MachineMemOperand::MOStore, HiMemVT.getStoreSize(), Alignment, MST->getAAInfo(), MST->getRanges()); Hi = DAG.getMaskedStore(Chain, DL, DataHi, Ptr, MaskHi, HiMemVT, MMO, @@ -8598,12 +8593,6 @@ SDValue DAGCombiner::visitMLOAD(SDNode *N) { EVT MemoryVT = MLD->getMemoryVT(); unsigned Alignment = MLD->getOriginalAlignment(); - // if Alignment is equal to the vector size, - // take the half of it for the second part - unsigned SecondHalfAlignment = - (Alignment == MLD->getValueType(0).getSizeInBits()/8) ? - Alignment/2 : Alignment; - EVT LoMemVT, HiMemVT; std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT); @@ -8621,7 +8610,7 @@ SDValue DAGCombiner::visitMLOAD(SDNode *N) { MMO = DAG.getMachineFunction().getMachineMemOperand( MLD->getPointerInfo().getWithOffset(HiOffset), - MachineMemOperand::MOLoad, HiMemVT.getStoreSize(), SecondHalfAlignment, + MachineMemOperand::MOLoad, HiMemVT.getStoreSize(), Alignment, MLD->getAAInfo(), MLD->getRanges()); Hi = DAG.getMaskedLoad(HiVT, DL, Chain, Ptr, MaskHi, PassThruHi, HiMemVT, |

