[llvm] Remove already implemented target independent optimization opportunity (PR #101233)

Marc Auberer via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 12:54:48 PDT 2024


https://github.com/marcauberer created https://github.com/llvm/llvm-project/pull/101233

Fixes #101127

See this working example: https://godbolt.org/z/z15oj15eP

>From 2095fa9249d3ce5a083cc1af45b3cb0d859c0371 Mon Sep 17 00:00:00 2001
From: Marc Auberer <marc.auberer at chillibits.com>
Date: Tue, 30 Jul 2024 21:50:07 +0200
Subject: [PATCH] Remove already implemented target independent optimization
 opportunity

See this working example: https://godbolt.org/z/z15oj15eP
---
 llvm/lib/Target/README.txt | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index 05e590e71fe10..adf75c3368677 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/lib/Target/README.txt
@@ -2,20 +2,6 @@ Target Independent Opportunities:
 
 //===---------------------------------------------------------------------===//
 
-We should recognized various "overflow detection" idioms and translate them into
-llvm.uadd.with.overflow and similar intrinsics.  Here is a multiply idiom:
-
-unsigned int mul(unsigned int a,unsigned int b) {
- if ((unsigned long long)a*b>0xffffffff)
-   exit(0);
-  return a*b;
-}
-
-The legalization code for mul-with-overflow needs to be made more robust before
-this can be implemented though.
-
-//===---------------------------------------------------------------------===//
-
 Get the C front-end to expand hypot(x,y) -> llvm.sqrt(x*x+y*y) when errno and
 precision don't matter (ffastmath).  Misc/mandel will like this. :)  This isn't
 safe in general, even on darwin.  See the libm implementation of hypot for



More information about the llvm-commits mailing list