summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-06-30 15:32:45 +0000
committerSanjay Patel <spatel@rotateright.com>2016-06-30 15:32:45 +0000
commit7521e1b880a14a9df799ef95db2a0084a51be8f1 (patch)
treeae7a6ada7faa72920006f75e204c98f918b34045 /llvm/lib/Transforms
parent596a3bd9ece335303c14cd3d33cbc4cb1717db88 (diff)
downloadbcm5719-llvm-7521e1b880a14a9df799ef95db2a0084a51be8f1.tar.gz
bcm5719-llvm-7521e1b880a14a9df799ef95db2a0084a51be8f1.zip
fix formatting, add TODO; NFC
llvm-svn: 274238
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index c0fb365cb88..f48b1be5168 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2176,6 +2176,7 @@ Instruction *InstCombiner::visitSwitchInst(SwitchInst &SI) {
unsigned LeadingKnownOnes = KnownOne.countLeadingOnes();
// Compute the number of leading bits we can ignore.
+ // TODO: A better way to determine this would use ComputeNumSignBits().
for (auto &C : SI.cases()) {
LeadingKnownZeros = std::min(
LeadingKnownZeros, C.getCaseValue()->getValue().countLeadingZeros());
@@ -2189,7 +2190,7 @@ Instruction *InstCombiner::visitSwitchInst(SwitchInst &SI) {
// This may produce a non-standard type for the switch, but that's ok because
// the backend should extend back to a legal type for the target.
bool TruncCond = false;
- if (NewWidth > 0 && NewWidth < BitWidth) {
+ if (NewWidth > 0 && NewWidth < BitWidth) {
TruncCond = true;
IntegerType *Ty = IntegerType::get(SI.getContext(), NewWidth);
Builder->SetInsertPoint(&SI);
OpenPOWER on IntegriCloud