From 08859ffa6312f3bf7bd08fc98a81a6c86e1c9752 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121853 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/README.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 17617ad5473..e59c28697a1 100644 --- a/lib/Target/README.txt +++ b/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