From a847b0f37d5dd0a3334eb822b35e89fa835a4b8d Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Wed, 31 Jul 2024 19:01:06 +0200 Subject: [PATCH] Remove already implemented target independent optimization opportunity (#101233) Fixes #101127 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 05e590e71fe1..adf75c336867 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