Save LaneMask with livein registers
[oota-llvm.git] / lib / CodeGen / LivePhysRegs.cpp
index 30addff13fa76ed663ddd4c1b403db203876f2f9..61226b7472acf20d3208c2afede8aeb990ce81e0 100644 (file)
@@ -128,8 +128,8 @@ void LivePhysRegs::dump() const {
 
 /// Add live-in registers of basic block \p MBB to \p LiveRegs.
 static void addLiveIns(LivePhysRegs &LiveRegs, const MachineBasicBlock &MBB) {
-  for (unsigned LI : MBB.liveins())
-    LiveRegs.addReg(LI);
+  for (const auto &LI : MBB.liveins())
+    LiveRegs.addReg(LI.PhysReg);
 }
 
 /// Add pristine registers to the given \p LiveRegs. This function removes