[llvm] 99e78cb - [DemandedBits] Add braces to large if (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 13:13:57 PDT 2020
Author: Nikita Popov
Date: 2020-09-10T22:13:27+02:00
New Revision: 99e78cb7185db1a15afd33020a1e026dc7ac5e1b
URL: https://github.com/llvm/llvm-project/commit/99e78cb7185db1a15afd33020a1e026dc7ac5e1b
DIFF: https://github.com/llvm/llvm-project/commit/99e78cb7185db1a15afd33020a1e026dc7ac5e1b.diff
LOG: [DemandedBits] Add braces to large if (NFC)
While the if only contains a single statement, it happens to be
a huge switch. Add braces to make this code easier to read.
Added:
Modified:
llvm/lib/Analysis/DemandedBits.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/DemandedBits.cpp b/llvm/lib/Analysis/DemandedBits.cpp
index 62e08f3f8a8b..1575d1555072 100644
--- a/llvm/lib/Analysis/DemandedBits.cpp
+++ b/llvm/lib/Analysis/DemandedBits.cpp
@@ -115,7 +115,7 @@ void DemandedBits::determineLiveOperandBits(
default: break;
case Instruction::Call:
case Instruction::Invoke:
- if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(UserI))
+ if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(UserI)) {
switch (II->getIntrinsicID()) {
default: break;
case Intrinsic::bswap:
@@ -171,6 +171,7 @@ void DemandedBits::determineLiveOperandBits(
break;
}
}
+ }
break;
case Instruction::Add:
if (AOut.isMask()) {
More information about the llvm-commits
mailing list