Skip to content
  • Chris Lattner's avatar
    recognize an unsigned add with overflow idiom into uadd. · 5e0c0c72
    Chris Lattner authored
    This resolves a README entry and technically resolves PR4916,
    but we still get poor code for the testcase in that PR because
    GVN isn't CSE'ing uadd with add, filed as PR8817.
    
    Previously we got:
    
    _test7:                                 ## @test7
    	addq	%rsi, %rdi
    	cmpq	%rdi, %rsi
    	movl	$42, %eax
    	cmovaq	%rsi, %rax
    	ret
    
    Now we get:
    
    _test7:                                 ## @test7
    	addq	%rsi, %rdi
    	movl	$42, %eax
    	cmovbq	%rsi, %rax
    	ret
    
    llvm-svn: 122182
    5e0c0c72
Loading