[llvm] 7bea41e - LoopIdiomRecognize: strip bad TODO (NFC) (#92890)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 09:43:02 PDT 2024
Author: Ramkumar Ramachandra
Date: 2024-05-28T17:42:58+01:00
New Revision: 7bea41e173367e2a535bd2188fd652a2ca267b90
URL: https://github.com/llvm/llvm-project/commit/7bea41e173367e2a535bd2188fd652a2ca267b90
DIFF: https://github.com/llvm/llvm-project/commit/7bea41e173367e2a535bd2188fd652a2ca267b90.diff
LOG: LoopIdiomRecognize: strip bad TODO (NFC) (#92890)
There are several reasons why handling powi in LoopIdiomRecognize is a
bad idea:
- powi corresponds to a GCC builtin that is only defined for C int
(which is i32 for most targets).
- powi isn't always lowered by targets correctly for non-i32 parameters.
Several targets fail to compile llvm.powi.f32.i16, for example.
- Unlike memcpy and memset, which tend to be important enough internal
intrinsics that you have to handle them correctly even in freestanding
modes, powi isn't.
Strip this bad TODO to avoid misleading contributors.
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index c7e25c9f3d2c9..3fe5478408d45 100644
--- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -22,8 +22,6 @@
//
// Future loop memory idioms to recognize:
// memcmp, strlen, etc.
-// Future floating point idioms to recognize in -ffast-math mode:
-// fpowi
//
// This could recognize common matrix multiplies and dot product idioms and
// replace them with calls to BLAS (if linked in??).
@@ -1107,7 +1105,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
GV->setAlignment(Align(16));
Value *PatternPtr = GV;
NewCall = Builder.CreateCall(MSP, {BasePtr, PatternPtr, NumBytes});
-
+
// Set the TBAA info if present.
if (AATags.TBAA)
NewCall->setMetadata(LLVMContext::MD_tbaa, AATags.TBAA);
@@ -1117,7 +1115,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
if (AATags.NoAlias)
NewCall->setMetadata(LLVMContext::MD_noalias, AATags.NoAlias);
- }
+ }
NewCall->setDebugLoc(TheStore->getDebugLoc());
More information about the llvm-commits
mailing list