[PATCH] D129915: [InstCombine] Tighten up known library function signature tests (PR #56463)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 07:52:15 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:962
+ // double (const char*, char**)
+ return (NumParams == 2 && FTy.getReturnType()->isDoubleTy() &
+ FTy.getParamType(0)->isPointerTy() &&
----------------
`&` -> `&&` (and below)
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:1073
+ FTy.getParamType(0) == FTy.getReturnType() &&
+ FTy.getParamType(1) == FTy.getParamType(1) &&
+ FTy.getParamType(2)->isIntegerTy(32) &&
----------------
One of those is probably supposed to be getParamType(0)?
================
Comment at: llvm/test/Transforms/InferFunctionAttrs/annotate-2.ll:3
+; not annotated with argument attributes. This negative test complements
+; annotate.ll.
+;
----------------
You probably want `--match-full-lines` to make sure there are no trailing attributes.
================
Comment at: llvm/test/Transforms/InferFunctionAttrs/annotate-2.ll:6
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -inferattrs -opaque-pointers -S | FileCheck %s
+
----------------
`-opaque-pointers` flag is not needed
================
Comment at: llvm/test/Transforms/InstCombine/sprintf-3.ll:1
+; Test that the stpcpy library call simplifier works correctly.
+;
----------------
sprintf?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129915/new/
https://reviews.llvm.org/D129915
More information about the llvm-commits
mailing list