diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-08-07 14:50:39 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-08-07 14:50:39 +0000 |
| commit | 1bfadb04995e02c657cb22219ea9702c25cdc68d (patch) | |
| tree | 586145d06d8e9abb37d6cae4723cfa142c4e942a /llvm/lib/CodeGen | |
| parent | 6943e3935396033f1a91451d93f8745853ee1615 (diff) | |
| download | bcm5719-llvm-1bfadb04995e02c657cb22219ea9702c25cdc68d.tar.gz bcm5719-llvm-1bfadb04995e02c657cb22219ea9702c25cdc68d.zip | |
[DAG] Allow non-uniform constant vectors to call BuildSDIV
This was missed in D50185.
NFC until we add actual non-uniform support to BuildSDIV (similar BuildUDIV support in D49248) - for now it just early outs.
llvm-svn: 339147
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index f6597444d31..fce9e3d68c4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3218,7 +3218,8 @@ SDValue DAGCombiner::visitSDIVLike(SDValue N0, SDValue N1, SDNode *N) { // alternate sequence. Targets may check function attributes for size/speed // trade-offs. AttributeList Attr = DAG.getMachineFunction().getFunction().getAttributes(); - if (N1C && !TLI.isIntDivCheap(N->getValueType(0), Attr)) + if (isConstantOrConstantVector(N1, /*NoOpaques*/ true) && + !TLI.isIntDivCheap(N->getValueType(0), Attr)) if (SDValue Op = BuildSDIV(N)) return Op; |

