aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2020-02-09 19:08:04 -0600
committerJohannes Doerfert <johannes@jdoerfert.de>2020-02-10 00:55:09 -0600
commit7e7e6594b3450dbdaffbbeb39e832f6f39ce45a9 (patch)
treedb914efb88b29999b25f629d8ec094a0c782d5c3 /llvm/lib
parentffdbd2a06ca2a2703647fb87140b8965b3b0218c (diff)
downloadllvm-7e7e6594b3450dbdaffbbeb39e832f6f39ce45a9.zip
llvm-7e7e6594b3450dbdaffbbeb39e832f6f39ce45a9.tar.gz
llvm-7e7e6594b3450dbdaffbbeb39e832f6f39ce45a9.tar.bz2
[Attributor] Allow SelectInst in AAValueConstantRangeFloating
The genericValueTraversal will already handle SelectInst properly and we just needed to allow them in the initialize method.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index f16b9bc..d8d3108 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -6189,6 +6189,11 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
if (CI->getOperand(0)->getType()->isIntegerTy())
return;
+ // We can work with select instruction as we traverse their operands
+ // during update.
+ if (isa<SelectInst>(V))
+ return;
+
// Otherwise we give up.
indicatePessimisticFixpoint();