aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-10-11 05:26:03 -0700
committerGitHub <noreply@github.com>2024-10-11 05:26:03 -0700
commitfa789dffb1e12c2aece0187aeacc48dfb1768340 (patch)
treecebfdc0d8b0111115cbefeb8d2927fe8c2cfbdfb /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent900ea21ffb38ba5b783b20f394c43c6c89d58086 (diff)
downloadllvm-fa789dffb1e12c2aece0187aeacc48dfb1768340.zip
llvm-fa789dffb1e12c2aece0187aeacc48dfb1768340.tar.gz
llvm-fa789dffb1e12c2aece0187aeacc48dfb1768340.tar.bz2
[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)
Rename the function to reflect its correct behavior and to be consistent with `Module::getOrInsertFunction`. This is also in preparation of adding a new `Intrinsic::getDeclaration` that will have behavior similar to `Module::getFunction` (i.e, just lookup, no creation).
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 77d9661..0145ee7 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -2481,8 +2481,8 @@ TEST_F(ComputeKnownBitsTest, ComputeKnownBitsAddWithRange) {
TEST_F(ComputeKnownBitsTest, ComputeKnownBitsUnknownVScale) {
Module M("", Context);
IRBuilder<> Builder(Context);
- Function *TheFn =
- Intrinsic::getDeclaration(&M, Intrinsic::vscale, {Builder.getInt32Ty()});
+ Function *TheFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::vscale,
+ {Builder.getInt32Ty()});
CallInst *CI = Builder.CreateCall(TheFn, {}, {}, "");
KnownBits Known = computeKnownBits(CI, M.getDataLayout(), /* Depth */ 0);