[llvm] r196391 - [X86] Check YMM31/ZMM31 as well
Michael Liao
michael.liao at intel.com
Wed Dec 4 09:44:23 PST 2013
Author: hliao
Date: Wed Dec 4 11:44:22 2013
New Revision: 196391
URL: http://llvm.org/viewvc/llvm-project?rev=196391&view=rev
Log:
[X86] Check YMM31/ZMM31 as well
- No test case as there's no calling convention preserve YMM31/ZMM31 only
Modified:
llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
Modified: llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp?rev=196391&r1=196390&r2=196391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp Wed Dec 4 11:44:22 2013
@@ -122,11 +122,11 @@ static bool checkFnHasLiveInYmm(MachineR
}
static bool clobbersAllYmmRegs(const MachineOperand &MO) {
- for (unsigned reg = X86::YMM0; reg < X86::YMM31; ++reg) {
+ for (unsigned reg = X86::YMM0; reg <= X86::YMM31; ++reg) {
if (!MO.clobbersPhysReg(reg))
return false;
}
- for (unsigned reg = X86::ZMM0; reg < X86::ZMM31; ++reg) {
+ for (unsigned reg = X86::ZMM0; reg <= X86::ZMM31; ++reg) {
if (!MO.clobbersPhysReg(reg))
return false;
}
@@ -155,11 +155,11 @@ static bool clobbersAnyYmmReg(MachineIns
const MachineOperand &MO = MI->getOperand(i);
if (!MO.isRegMask())
continue;
- for (unsigned reg = X86::YMM0; reg < X86::YMM31; ++reg) {
+ for (unsigned reg = X86::YMM0; reg <= X86::YMM31; ++reg) {
if (MO.clobbersPhysReg(reg))
return true;
}
- for (unsigned reg = X86::ZMM0; reg < X86::ZMM31; ++reg) {
+ for (unsigned reg = X86::ZMM0; reg <= X86::ZMM31; ++reg) {
if (MO.clobbersPhysReg(reg))
return true;
}
More information about the llvm-commits
mailing list