summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-11-26 15:23:20 +0000
committerSanjay Patel <spatel@rotateright.com>2016-11-26 15:23:20 +0000
commit8bd69b7ed9fb4e9d815326b3cfd507584e98c7ad (patch)
treec0352c1d6ee34885d89ef5d3b1a8bd7b0ef62273 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parente8a077badf852530077c8abda9d9d1737b44140c (diff)
downloadbcm5719-llvm-8bd69b7ed9fb4e9d815326b3cfd507584e98c7ad.tar.gz
bcm5719-llvm-8bd69b7ed9fb4e9d815326b3cfd507584e98c7ad.zip
[InstCombine] don't drop metadata in FoldOpIntoSelect()
llvm-svn: 287980
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 2529c473554..cdbc8eb4585 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -819,9 +819,9 @@ Instruction *InstCombiner::FoldOpIntoSelect(Instruction &Op, SelectInst *SI) {
}
}
- Value *SelectTVal = foldOperationIntoSelectOperand(Op, TV, this);
- Value *SelectFVal = foldOperationIntoSelectOperand(Op, FV, this);
- return SelectInst::Create(SI->getCondition(), SelectTVal, SelectFVal);
+ Value *NewTV = foldOperationIntoSelectOperand(Op, TV, this);
+ Value *NewFV = foldOperationIntoSelectOperand(Op, FV, this);
+ return SelectInst::Create(SI->getCondition(), NewTV, NewFV, "", nullptr, SI);
}
/// Given a binary operator, cast instruction, or select which has a PHI node as
OpenPOWER on IntegriCloud