[llvm] r261978 - [X86] Use inclusive ranges for XMM/YMM/ZMM registers in is32Extended and isX86_64ExtendedReg. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 21:29:35 PST 2016
Author: ctopper
Date: Thu Feb 25 23:29:35 2016
New Revision: 261978
URL: http://llvm.org/viewvc/llvm-project?rev=261978&view=rev
Log:
[X86] Use inclusive ranges for XMM/YMM/ZMM registers in is32Extended and isX86_64ExtendedReg. NFC
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86BaseInfo.h?rev=261978&r1=261977&r2=261978&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86BaseInfo.h (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86BaseInfo.h Thu Feb 25 23:29:35 2016
@@ -734,12 +734,12 @@ namespace X86II {
/// isX86_64ExtendedReg - Is the MachineOperand a x86-64 extended (r8 or
/// higher) register? e.g. r8, xmm8, xmm13, etc.
inline bool isX86_64ExtendedReg(unsigned RegNo) {
- if ((RegNo > X86::XMM7 && RegNo <= X86::XMM15) ||
- (RegNo > X86::XMM23 && RegNo <= X86::XMM31) ||
- (RegNo > X86::YMM7 && RegNo <= X86::YMM15) ||
- (RegNo > X86::YMM23 && RegNo <= X86::YMM31) ||
- (RegNo > X86::ZMM7 && RegNo <= X86::ZMM15) ||
- (RegNo > X86::ZMM23 && RegNo <= X86::ZMM31))
+ if ((RegNo >= X86::XMM8 && RegNo <= X86::XMM15) ||
+ (RegNo >= X86::XMM24 && RegNo <= X86::XMM31) ||
+ (RegNo >= X86::YMM8 && RegNo <= X86::YMM15) ||
+ (RegNo >= X86::YMM24 && RegNo <= X86::YMM31) ||
+ (RegNo >= X86::ZMM8 && RegNo <= X86::ZMM15) ||
+ (RegNo >= X86::ZMM24 && RegNo <= X86::ZMM31))
return true;
switch (RegNo) {
@@ -762,9 +762,9 @@ namespace X86II {
/// is32ExtendedReg - Is the MemoryOperand a 32 extended (zmm16 or higher)
/// registers? e.g. zmm21, etc.
static inline bool is32ExtendedReg(unsigned RegNo) {
- return ((RegNo > X86::XMM15 && RegNo <= X86::XMM31) ||
- (RegNo > X86::YMM15 && RegNo <= X86::YMM31) ||
- (RegNo > X86::ZMM15 && RegNo <= X86::ZMM31));
+ return ((RegNo >= X86::XMM16 && RegNo <= X86::XMM31) ||
+ (RegNo >= X86::YMM16 && RegNo <= X86::YMM31) ||
+ (RegNo >= X86::ZMM16 && RegNo <= X86::ZMM31));
}
More information about the llvm-commits
mailing list