From lattner at cs.uiuc.edu Mon May 10 00:11:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon May 10 00:11:04 2004 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx Message-ID: <200405100511.AAA25472@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Generic: 2004-05-09-LiveVarPartialRegister.llx added (r1.1) --- Log message: Testcase for PR337: http://llvm.cs.uiuc.edu/PR337 , which was reduced by Reid Spencer. --- Diffs of the changes: (+15 -0) Index: llvm/test/Regression/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx diff -c /dev/null llvm/test/Regression/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx:1.1 *** /dev/null Mon May 10 00:11:34 2004 --- llvm/test/Regression/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.llx Mon May 10 00:11:24 2004 *************** *** 0 **** --- 1,15 ---- + ; RUN: llvm-as < %s | lli + + %global_long_1 = linkonce global long 7 + %global_long_2 = linkonce global long 49 + + implementation ; Functions: + + int %main() { + %l1 = load long* %global_long_1 + %l2 = load long* %global_long_2 + %cond = setle long %l1, %l2 + %cast2 = cast bool %cond to int + %RV = sub int 1, %cast2 + ret int %RV + } From lattner at cs.uiuc.edu Mon May 10 00:13:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon May 10 00:13:03 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200405100512.AAA25489@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.30 -> 1.31 --- Log message: Patch to fix PR337: http://llvm.cs.uiuc.edu/PR337 . Make sure to mark all aliased physical registers as used when we see a read of a register. This is important in cases like: AL = ... AH = ... = AX The read of AX must make both the AL and AH defs live until the use. --- Diffs of the changes: (+8 -3) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.30 llvm/lib/CodeGen/LiveVariables.cpp:1.31 --- llvm/lib/CodeGen/LiveVariables.cpp:1.30 Sat May 1 16:24:24 2004 +++ llvm/lib/CodeGen/LiveVariables.cpp Mon May 10 00:12:43 2004 @@ -126,6 +126,12 @@ void LiveVariables::HandlePhysRegUse(unsigned Reg, MachineInstr *MI) { PhysRegInfo[Reg] = MI; PhysRegUsed[Reg] = true; + + for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + unsigned Alias = *AliasSet; ++AliasSet) { + PhysRegInfo[Alias] = MI; + PhysRegUsed[Alias] = true; + } } void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI) { @@ -140,11 +146,10 @@ PhysRegUsed[Reg] = false; for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); - *AliasSet; ++AliasSet) { - unsigned Alias = *AliasSet; + unsigned Alias = *AliasSet; ++AliasSet) { if (MachineInstr *LastUse = PhysRegInfo[Alias]) { if (PhysRegUsed[Alias]) - RegistersKilled.insert(std::make_pair(LastUse, Alias)); + RegistersKilled.insert(std::make_pair(LastUse, Alias)); else RegistersDead.insert(std::make_pair(LastUse, Alias)); } From lattner at cs.uiuc.edu Mon May 10 09:28:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon May 10 09:28:01 2004 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200405101428.JAA00718@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.177 -> 1.178 --- Log message: Bug fixed --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.177 llvm/docs/ReleaseNotes.html:1.178 --- llvm/docs/ReleaseNotes.html:1.177 Sun May 9 18:32:39 2004 +++ llvm/docs/ReleaseNotes.html Mon May 10 09:28:09 2004 @@ -211,6 +211,7 @@
Bugs in the C/C++ front-end:
@@ -643,7 +644,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure