summaryrefslogtreecommitdiff
path: root/lib/Target/ARM64/ARM64InstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM64/ARM64InstrInfo.cpp')
-rw-r--r--lib/Target/ARM64/ARM64InstrInfo.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/ARM64/ARM64InstrInfo.cpp b/lib/Target/ARM64/ARM64InstrInfo.cpp
index 75d906d9da..e4112655f8 100644
--- a/lib/Target/ARM64/ARM64InstrInfo.cpp
+++ b/lib/Target/ARM64/ARM64InstrInfo.cpp
@@ -827,14 +827,11 @@ bool ARM64InstrInfo::optimizeCompareInstr(
/// Return true if this is this instruction has a non-zero immediate
bool ARM64InstrInfo::hasNonZeroImm(const MachineInstr *MI) const {
- switch (MI->getOpcode()) {
- default:
- if (MI->getOperand(3).isImm()) {
- unsigned val = MI->getOperand(3).getImm();
- return (val != 0);
- }
- break;
+ if (MI->getOperand(3).isImm()) {
+ unsigned val = MI->getOperand(3).getImm();
+ return (val != 0);
}
+
return false;
}