From 2e33985300d5d0e5a46af12dc081db98744927fb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Dec 2010 07:25:55 +0000 Subject: [PATCH] add a note about overflow idiom recognition. llvm-svn: 121853 --- llvm/lib/Target/README.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt index 17617ad54735..e59c28697a19 100644 --- a/llvm/lib/Target/README.txt +++ b/llvm/lib/Target/README.txt @@ -73,7 +73,25 @@ This has a number of uses: //===---------------------------------------------------------------------===// -Make the PPC branch selector target independant +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+b