diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-04-07 07:36:45 +0700 |
---|---|---|
committer | Matt Arsenault <arsenm2@gmail.com> | 2025-04-13 16:47:07 +0200 |
commit | a24ef4b07ee798b14fe0f3daa23cc3ec09410bc6 (patch) | |
tree | 37a0dd05de2cae23ce1170fcff7382bbc8fecfe3 /llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | |
parent | db20b0d4ec96e4dee0b5ca6e7ddd616eafd88d40 (diff) | |
download | llvm-a24ef4b07ee798b14fe0f3daa23cc3ec09410bc6.zip llvm-a24ef4b07ee798b14fe0f3daa23cc3ec09410bc6.tar.gz llvm-a24ef4b07ee798b14fe0f3daa23cc3ec09410bc6.tar.bz2 |
SimplifyLibCalls: Skip sincospi optimization for ConstantData (#134688)
Avoids looking at the uselist, and it would probably be more
productive to constant fold this.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index 2d0027d..4e37c58 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -3002,6 +3002,9 @@ Value *LibCallSimplifier::optimizeSinCosPi(CallInst *CI, bool IsSin, IRBuilderBa return nullptr; Value *Arg = CI->getArgOperand(0); + if (isa<ConstantData>(Arg)) + return nullptr; + SmallVector<CallInst *, 1> SinCalls; SmallVector<CallInst *, 1> CosCalls; SmallVector<CallInst *, 1> SinCosCalls; |