forked from OSchip/llvm-project
				
			
							parent
							
								
									7ff39512a2
								
							
						
					
					
						commit
						ba52b94fa2
					
				| 
						 | 
				
			
			@ -265,32 +265,6 @@ This could be done in the dag combiner, by swapping a BR_CC when a SETCC of the
 | 
			
		|||
same operands (but backwards) exists.  In this case, this wouldn't save us 
 | 
			
		||||
anything though, because the compares still wouldn't be shared.
 | 
			
		||||
 | 
			
		||||
===-------------------------------------------------------------------------===
 | 
			
		||||
 | 
			
		||||
The legalizer should lower this:
 | 
			
		||||
 | 
			
		||||
bool %test(ulong %x) {
 | 
			
		||||
  %tmp = setlt ulong %x, 4294967296
 | 
			
		||||
  ret bool %tmp
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
into "if x.high == 0", not:
 | 
			
		||||
 | 
			
		||||
_test:
 | 
			
		||||
        cntlzw r2, r3
 | 
			
		||||
        xori r3, r3, 1
 | 
			
		||||
        cmplwi cr0, r3, 0
 | 
			
		||||
        srwi r2, r2, 5
 | 
			
		||||
        li r3, 0
 | 
			
		||||
        beq cr0, LBB1_2 ;entry
 | 
			
		||||
LBB1_1: ;entry
 | 
			
		||||
        mr r3, r2
 | 
			
		||||
LBB1_2: ;entry
 | 
			
		||||
        blr 
 | 
			
		||||
 | 
			
		||||
noticed in 2005-05-11-Popcount-ffs-fls.c.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===-------------------------------------------------------------------------===
 | 
			
		||||
 | 
			
		||||
We should custom expand setcc instead of pretending that we have it.  That
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue