mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Disable tail duplication in a case that breaks on Olden/tsp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -135,6 +135,10 @@ bool TailDup::canEliminateUnconditionalBranch(TerminatorInst *TI) { | |||||||
|       Instruction *User = cast<Instruction>(*UI); |       Instruction *User = cast<Instruction>(*UI); | ||||||
|       if (User->getParent() != Tail && User->getParent() != BB) |       if (User->getParent() != Tail && User->getParent() != BB) | ||||||
|         return false; |         return false; | ||||||
|  |  | ||||||
|  |       // The 'swap' problem foils the tail duplication rewriting code. | ||||||
|  |       if (isa<PHINode>(User) && User->getParent() == Tail) | ||||||
|  |         return false; | ||||||
|     } |     } | ||||||
|   return true; |   return true; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user