diff options
author | Anna Thomas <anna@azul.com> | 2017-03-28 09:32:24 +0000 |
---|---|---|
committer | Anna Thomas <anna@azul.com> | 2017-03-28 09:32:24 +0000 |
commit | 923e574bff006ea6a6888e1900ecc4d4a2a4ef41 (patch) | |
tree | 7274551adb434815d064bc32aacb50750a754f81 /llvm/lib/Transforms | |
parent | dfffaf579f2b4bc9184c23f271a57e1fa1ed6f01 (diff) | |
download | bcm5719-llvm-923e574bff006ea6a6888e1900ecc4d4a2a4ef41.tar.gz bcm5719-llvm-923e574bff006ea6a6888e1900ecc4d4a2a4ef41.zip |
[InstCombine] For select rule, use positive check of constant int for select operand. NFCI
llvm-svn: 298906
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 020e8c9f046..ebc1ea71e44 100644 --- 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), |