Skip to content

Commit 7bea41e

Browse files
authored
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.
1 parent 79c7342 commit 7bea41e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
//
2323
// Future loop memory idioms to recognize:
2424
// memcmp, strlen, etc.
25-
// Future floating point idioms to recognize in -ffast-math mode:
26-
// fpowi
2725
//
2826
// This could recognize common matrix multiplies and dot product idioms and
2927
// replace them with calls to BLAS (if linked in??).
@@ -1107,7 +1105,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
11071105
GV->setAlignment(Align(16));
11081106
Value *PatternPtr = GV;
11091107
NewCall = Builder.CreateCall(MSP, {BasePtr, PatternPtr, NumBytes});
1110-
1108+
11111109
// Set the TBAA info if present.
11121110
if (AATags.TBAA)
11131111
NewCall->setMetadata(LLVMContext::MD_tbaa, AATags.TBAA);
@@ -1117,7 +1115,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
11171115

11181116
if (AATags.NoAlias)
11191117
NewCall->setMetadata(LLVMContext::MD_noalias, AATags.NoAlias);
1120-
}
1118+
}
11211119

11221120
NewCall->setDebugLoc(TheStore->getDebugLoc());
11231121

0 commit comments

Comments
 (0)