From e5cbdca3bd4bc40ca31282531a9292f70648d265 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 19 Dec 2010 19:37:52 +0000 Subject: recognize an unsigned add with overflow idiom into uadd. 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122182 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/README.txt | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'lib/Target/README.txt') diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 5c97b8984c..abb8ee6f49 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -74,26 +74,7 @@ This has a number of uses: //===---------------------------------------------------------------------===// We should recognized various "overflow detection" idioms and translate them into -llvm.uadd.with.overflow and similar intrinsics. For example, we compile this: - -size_t add(size_t a,size_t b) { - if (a+b0xffffffff) -- cgit v1.2.3