projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a25f25c
)
[X86] X86FastISel::fastMaterializeConstant - break if-else chain to fix llvm-else...
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 25 Sep 2021 13:31:14 +0000
(14:31 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 25 Sep 2021 13:31:14 +0000
(14:31 +0100)
All previous if-else cases return
llvm/lib/Target/X86/X86FastISel.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86FastISel.cpp
b/llvm/lib/Target/X86/X86FastISel.cpp
index f4718befa8fb2b46635bce7c5fdf4b7b9d16dff7..c298dc1f8c3e876d73ce733dd052b9a9d3dc0f64 100644
(file)
--- 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: