diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-06-26 17:46:51 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-06-26 17:46:51 +0000 |
commit | 7f55af37f40ed6e03b646ca57688dee492d39a59 (patch) | |
tree | 4965fbed3d1e98228effe2e4b6b3b4298f9be33a /llvm/lib/CodeGen | |
parent | 7a17a8ba1e9c942b7e28566179eccc453f96b056 (diff) | |
download | bcm5719-llvm-7f55af37f40ed6e03b646ca57688dee492d39a59.tar.gz bcm5719-llvm-7f55af37f40ed6e03b646ca57688dee492d39a59.zip |
[DAGCombiner] Don't accept -1 sdiv divisors in sdiv-by-pow2 vector expansion (PR37119)
Temporary fix until I've managed to get D45806 updated - both +1 and -1 special cases need to be properly supported.
llvm-svn: 335637
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index f6dbd747453..640f07b262c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3051,6 +3051,8 @@ SDValue DAGCombiner::visitSDIV(SDNode *N) { // == 1) if (C->getAPIntValue().isOneValue()) return false; + if (C->getAPIntValue().isAllOnesValue()) + return false; if (C->getAPIntValue().isPowerOf2()) return true; |