projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfffaf5
)
[InstCombine] For select rule, use positive check of constant int for select operand...
author
Anna Thomas
<anna@azul.com>
Tue, 28 Mar 2017 09:32:24 +0000
(09:32 +0000)
committer
Anna Thomas
<anna@azul.com>
Tue, 28 Mar 2017 09:32:24 +0000
(09:32 +0000)
llvm-svn: 298906
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index
020e8c9
..
ebc1ea7
100644
(file)
--- a/
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@
-912,7
+912,7
@@
Instruction *InstCombiner::FoldOpIntoPhi(Instruction &I) {
// FalseVInPred versus TrueVInPred. When we have individual nonzero
// elements in the vector, we will incorrectly fold InC to
// `TrueVInPred`.
- if (InC && !isa<ConstantExpr>(InC) &&
!isa<VectorType>(InC->getType()
))
+ if (InC && !isa<ConstantExpr>(InC) &&
isa<ConstantInt>(InC
))
InV = InC->isNullValue() ? FalseVInPred : TrueVInPred;
else
InV = Builder->CreateSelect(PN->getIncomingValue(i),