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:
ffd8662
)
[X86] Mark the default case of the X86InstrInfo::convertToThreeAddress switch as...
author
Craig Topper
<craig.topper@intel.com>
Tue, 2 Apr 2019 20:52:16 +0000
(20:52 +0000)
committer
Craig Topper
<craig.topper@intel.com>
Tue, 2 Apr 2019 20:52:16 +0000
(20:52 +0000)
This function should only be called with instructions that are really convertible. And all
convertible instructions need to be handled by the switch. So nothing should use the default.
llvm-svn: 357529
llvm/lib/Target/X86/X86InstrInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86InstrInfo.cpp
b/llvm/lib/Target/X86/X86InstrInfo.cpp
index
e157bc1
..
4aa365c
100644
(file)
--- a/
llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/
llvm/lib/Target/X86/X86InstrInfo.cpp
@@
-869,7
+869,7
@@
X86InstrInfo::convertToThreeAddress(MachineFunction::iterator &MFI,
bool Is8BitOp = false;
unsigned MIOpc = MI.getOpcode();
switch (MIOpc) {
- default:
return nullptr
;
+ default:
llvm_unreachable("Unreachable!")
;
case X86::SHL64ri: {
assert(MI.getNumOperands() >= 3 && "Unknown shift instruction!");
unsigned ShAmt = getTruncatedShiftCount(MI, 2);