diff options
| author | Louis Gerbarg <lgg@apple.com> | 2014-10-30 22:21:03 +0000 |
|---|---|---|
| committer | Louis Gerbarg <lgg@apple.com> | 2014-10-30 22:21:03 +0000 |
| commit | e8f9c782477de40ebbfe1269e72e55919be4a5af (patch) | |
| tree | 4ad820b5af24869a01ed4a835b58ae233b2ede13 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 14e2bcccfb84bf6025051797a41d1d406c93e19d (diff) | |
| download | bcm5719-llvm-e8f9c782477de40ebbfe1269e72e55919be4a5af.tar.gz bcm5719-llvm-e8f9c782477de40ebbfe1269e72e55919be4a5af.zip | |
Fix incorrect invariant check in DAG Combine
Earlier this summer I fixed an issue where we were incorrectly combining
multiple loads that had different constraints such alignment, invariance,
temporality, etc. Apparently in one case I made copt paste error and swapped
alignment and invariance.
Tests included.
rdar://18816719
llvm-svn: 220933
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index acea763f5ba..0d5cabaaf27 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -11542,7 +11542,7 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS, // It is safe to replace the two loads if they have different alignments, // but the new load must be the minimum (most restrictive) alignment of the // inputs. - bool isInvariant = LLD->getAlignment() & RLD->getAlignment(); + bool isInvariant = LLD->isInvariant() & RLD->isInvariant(); unsigned Alignment = std::min(LLD->getAlignment(), RLD->getAlignment()); if (LLD->getExtensionType() == ISD::NON_EXTLOAD) { Load = DAG.getLoad(TheSelect->getValueType(0), |

