summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-05-20 17:00:10 +0000
committerSanjay Patel <spatel@rotateright.com>2016-05-20 17:00:10 +0000
commit1dc57cb94493ee0f24a96e4d0bd4a79d14b8847c (patch)
treee545b6def95dfe7ea15d4aac9147841936f194da /llvm/lib
parent46df722eb0101753667334749a2730bd040792e2 (diff)
downloadbcm5719-llvm-1dc57cb94493ee0f24a96e4d0bd4a79d14b8847c.tar.gz
bcm5719-llvm-1dc57cb94493ee0f24a96e4d0bd4a79d14b8847c.zip
use range-loops; NFCI
llvm-svn: 270236
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86VZeroUpper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86VZeroUpper.cpp b/llvm/lib/Target/X86/X86VZeroUpper.cpp
index dd1755377db..fc0bce45bd9 100644
--- a/llvm/lib/Target/X86/X86VZeroUpper.cpp
+++ b/llvm/lib/Target/X86/X86VZeroUpper.cpp
@@ -128,8 +128,7 @@ static bool clobbersAllYmmRegs(const MachineOperand &MO) {
}
static bool hasYmmReg(MachineInstr *MI) {
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- const MachineOperand &MO = MI->getOperand(i);
+ for (const MachineOperand &MO : MI->operands()) {
if (MI->isCall() && MO.isRegMask() && !clobbersAllYmmRegs(MO))
return true;
if (!MO.isReg())
@@ -145,8 +144,7 @@ static bool hasYmmReg(MachineInstr *MI) {
/// Check if any YMM register will be clobbered by this instruction.
static bool callClobbersAnyYmmReg(MachineInstr *MI) {
assert(MI->isCall() && "Can only be called on call instructions.");
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- const MachineOperand &MO = MI->getOperand(i);
+ for (const MachineOperand &MO : MI->operands()) {
if (!MO.isRegMask())
continue;
for (unsigned reg = X86::YMM0; reg <= X86::YMM15; ++reg) {
OpenPOWER on IntegriCloud