Fix a really nasty bug that was breaking ijpeg in LLC mode. We were incorrectly
authorChris Lattner <sabre@nondot.org>
Thu, 18 Mar 2004 06:29:54 +0000 (06:29 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Mar 2004 06:29:54 +0000 (06:29 +0000)
folding load instructions into other instructions across free instruction
boundaries.  Perhaps this will also fix the other strange failures?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12494 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp

index 5fad0e788afbea3ab5643f24579d3ab7497f8477..e631fdb6ff589100a317677a76db4d9aa3fde075 100644 (file)
@@ -1422,6 +1422,8 @@ static bool isSafeToFoldLoadIntoInstruction(LoadInst &LI, Instruction &User) {
   // really use alias analysis here, but for now we just do something simple.
   for (++It; It != BasicBlock::iterator(&User); ++It) {
     switch (It->getOpcode()) {
+    case Instruction::Malloc:
+    case Instruction::Free:
     case Instruction::Store:
     case Instruction::Call:
     case Instruction::Invoke:
index 5fad0e788afbea3ab5643f24579d3ab7497f8477..e631fdb6ff589100a317677a76db4d9aa3fde075 100644 (file)
@@ -1422,6 +1422,8 @@ static bool isSafeToFoldLoadIntoInstruction(LoadInst &LI, Instruction &User) {
   // really use alias analysis here, but for now we just do something simple.
   for (++It; It != BasicBlock::iterator(&User); ++It) {
     switch (It->getOpcode()) {
+    case Instruction::Malloc:
+    case Instruction::Free:
     case Instruction::Store:
     case Instruction::Call:
     case Instruction::Invoke: