[llvm] 86f4899 - [X86] Fix typo in getCMovOpcode.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 31 21:51:21 PST 2019
Author: Craig Topper
Date: 2019-12-31T21:50:38-08:00
New Revision: 86f48999f46f41687f152e0854bdd352250b117c
URL: https://github.com/llvm/llvm-project/commit/86f48999f46f41687f152e0854bdd352250b117c
DIFF: https://github.com/llvm/llvm-project/commit/86f48999f46f41687f152e0854bdd352250b117c.diff
LOG: [X86] Fix typo in getCMovOpcode.
The 64-bit HasMemoryOperand line was using CMOV32rm instead of
CMOV64rm. Not sure how to test this. We have no test coverage
that passes true for HasMemoryOperand.
Added:
Modified:
llvm/lib/Target/X86/X86InstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp
index c70d09686b75..f41a27aba3ff 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -2305,7 +2305,7 @@ unsigned X86::getCMovOpcode(unsigned RegBytes, bool HasMemoryOperand) {
default: llvm_unreachable("Illegal register size!");
case 2: return HasMemoryOperand ? X86::CMOV16rm : X86::CMOV16rr;
case 4: return HasMemoryOperand ? X86::CMOV32rm : X86::CMOV32rr;
- case 8: return HasMemoryOperand ? X86::CMOV32rm : X86::CMOV64rr;
+ case 8: return HasMemoryOperand ? X86::CMOV64rm : X86::CMOV64rr;
}
}
More information about the llvm-commits
mailing list