diff options
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 322e9be0083..b809bbc1c6c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -5428,6 +5428,10 @@ SDValue DAGCombiner::unfoldMaskedMerge(SDNode *N) { if (!TLI.hasAndNot(M)) return SDValue(); + // If Y is a constant, check that 'andn' works with immediates. + if (!TLI.hasAndNot(Y)) + return SDValue(); + SDLoc DL(N); SDValue LHS = DAG.getNode(ISD::AND, DL, VT, X, M); |