From ec899c30d9bf419fb8d585db98123dea65953f7d 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 --- 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