Remove already implemented target independent optimization opportunity (#101233)

Fixes #101127

See this working example: https://godbolt.org/z/z15oj15eP
This commit is contained in:
Marc Auberer 2024-07-31 19:01:06 +02:00 committed by GitHub
parent 6a54dfbfe5
commit a847b0f37d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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