[llvm] 4c72b10 - [X86] X86FastISel::fastMaterializeConstant - break if-else chain to fix llvm-else-after-return warning. NFCI
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 25 06:35:45 PDT 2021
Author: Simon Pilgrim
Date: 2021-09-25T14:31:14+01:00
New Revision: 4c72b10f0a28be7beb6f7a8cd7d031c9810dc23b
URL: https://github.com/llvm/llvm-project/commit/4c72b10f0a28be7beb6f7a8cd7d031c9810dc23b
DIFF: https://github.com/llvm/llvm-project/commit/4c72b10f0a28be7beb6f7a8cd7d031c9810dc23b.diff
LOG: [X86] X86FastISel::fastMaterializeConstant - break if-else chain to fix llvm-else-after-return warning. NFCI
All previous if-else cases return
Added:
Modified:
llvm/lib/Target/X86/X86FastISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index f4718befa8fb..c298dc1f8c3e 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -3842,11 +3842,11 @@ unsigned X86FastISel::fastMaterializeConstant(const Constant *C) {
if (const auto *CI = dyn_cast<ConstantInt>(C))
return X86MaterializeInt(CI, VT);
- else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
+ if (const auto *CFP = dyn_cast<ConstantFP>(C))
return X86MaterializeFP(CFP, VT);
- else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
+ if (const auto *GV = dyn_cast<GlobalValue>(C))
return X86MaterializeGV(GV, VT);
- else if (isa<UndefValue>(C)) {
+ if (isa<UndefValue>(C)) {
unsigned Opc = 0;
switch (VT.SimpleTy) {
default:
More information about the llvm-commits
mailing list