[llvm-branch-commits] [llvm] [DLCov] Origin-Tracking: Collect stack traces in DebugLoc (PR #143592)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 11 01:54:06 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {undef deprecator}-->
:warning: undef deprecator found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' 'HEAD~1' HEAD clang/test/CIR/CodeGen/ctor.cpp clang/test/CodeGen/X86/cygwin-varargs.c clang/test/OpenMP/for_private_reduction_codegen.cpp flang-rt/include/flang-rt/runtime/work-queue.h flang-rt/lib/runtime/work-queue.cpp libcxx/test/std/time/time.point/time.point.arithmetic/op_++.pass.cpp libcxx/test/std/time/time.point/time.point.arithmetic/op_++int.pass.cpp libcxx/test/std/time/time.point/time.point.arithmetic/op_--.pass.cpp libcxx/test/std/time/time.point/time.point.arithmetic/op_--int.pass.cpp llvm/test/CodeGen/AMDGPU/move-to-valu-pseudo-scalar-trans-f16-fake16.ll llvm/test/CodeGen/AMDGPU/move-to-valu-pseudo-scalar-trans-f16-true16.ll llvm/test/CodeGen/RISCV/select-cond.ll llvm/test/CodeGen/X86/bsf.ll llvm/test/CodeGen/X86/bsr.ll llvm/test/Transforms/IndVarSimplify/iv-cmp-sext.ll llvm/test/Transforms/LoopUnroll/peel-last-iteration-minmax.ll llvm/test/Transforms/LowerMatrixIntrinsics/unary.ll openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp bolt/include/bolt/Core/BinaryFunction.h bolt/include/bolt/Profile/DataReader.h bolt/include/bolt/Profile/ProfileYAMLMapping.h bolt/lib/Core/BinaryFunction.cpp bolt/lib/Passes/ProfileQualityStats.cpp bolt/lib/Profile/DataAggregator.cpp bolt/lib/Profile/DataReader.cpp bolt/lib/Profile/YAMLProfileReader.cpp bolt/lib/Profile/YAMLProfileWriter.cpp clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.cpp clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.cpp clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp clang-tools-extra/clang-tidy/altera/AlteraTidyModule.cpp clang-tools-extra/clang-tidy/android/AndroidTidyModule.cpp clang-tools-extra/clang-tidy/boost/BoostTidyModule.cpp clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp clang-tools-extra/clang-tidy/bugprone/IncDecInConditionsCheck.cpp clang-tools-extra/clang-tidy/bugprone/MultipleNewInOneExpressionCheck.cpp clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.cpp clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.cpp clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp clang-tools-extra/clang-tidy/concurrency/ConcurrencyTidyModule.cpp clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp clang-tools-extra/clang-tidy/darwin/DarwinTidyModule.cpp clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp clang-tools-extra/clang-tidy/linuxkernel/LinuxKernelTidyModule.cpp clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp clang-tools-extra/clang-tidy/llvmlibc/LLVMLibcTidyModule.cpp clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.cpp clang-tools-extra/clang-tidy/mpi/MPITidyModule.cpp clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.cpp clang-tools-extra/clang-tidy/objc/ObjCTidyModule.cpp clang-tools-extra/clang-tidy/openmp/OpenMPTidyModule.cpp clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp clang-tools-extra/clang-tidy/readability/RedundantInlineSpecifierCheck.cpp clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.cpp clang-tools-extra/clang-tidy/zircon/ZirconTidyModule.cpp clang/include/clang/CIR/MissingFeatures.h clang/lib/Basic/Targets/X86.h clang/lib/CIR/CodeGen/CIRGenCall.cpp clang/lib/CIR/CodeGen/CIRGenClass.cpp clang/lib/CIR/CodeGen/CIRGenExpr.cpp clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp clang/lib/CIR/CodeGen/CIRGenFunction.h clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/CodeGen/CIRGenModule.h clang/lib/CIR/CodeGen/CIRGenTypes.h clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRuntime.h clang/lib/CodeGen/CGStmtOpenMP.cpp clang/lib/CodeGen/CoverageMappingGen.cpp clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/distribute_simd_misc_messages.c clang/test/OpenMP/for_reduction_messages.cpp clang/test/OpenMP/for_simd_reduction_messages.cpp clang/test/OpenMP/sections_reduction_messages.cpp compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp flang-rt/include/flang-rt/runtime/environment.h flang-rt/include/flang-rt/runtime/stat.h flang-rt/include/flang-rt/runtime/type-info.h flang-rt/lib/runtime/assign.cpp flang-rt/lib/runtime/derived.cpp flang-rt/lib/runtime/descriptor-io.cpp flang-rt/lib/runtime/descriptor-io.h flang-rt/lib/runtime/environment.cpp flang-rt/lib/runtime/namelist.cpp flang-rt/lib/runtime/tools.cpp flang-rt/lib/runtime/type-info.cpp flang-rt/unittests/Runtime/ExternalIOTest.cpp flang/include/flang/Parser/tools.h flang/include/flang/Runtime/assign.h flang/include/flang/Semantics/tools.h flang/include/flang/Support/Fortran-features.h flang/lib/Lower/Bridge.cpp flang/lib/Lower/OpenACC.cpp flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp flang/lib/Parser/tools.cpp flang/lib/Semantics/check-call.cpp flang/lib/Semantics/check-cuda.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/runtime-type-info.cpp flang/lib/Semantics/tools.cpp flang/tools/bbc/bbc.cpp libc/test/src/sys/prctl/linux/prctl_test.cpp libcxx/include/__chrono/time_point.h lldb/source/Commands/CommandObjectTarget.cpp llvm/include/llvm/Analysis/IR2Vec.h llvm/include/llvm/IR/DebugLoc.h llvm/include/llvm/IR/Instruction.h llvm/lib/Analysis/IR2Vec.cpp llvm/lib/CodeGen/BranchFolding.cpp llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/IR/ConstantFold.cpp llvm/lib/IR/DebugLoc.cpp llvm/lib/IR/Instruction.cpp llvm/lib/IR/Instructions.cpp llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/Coroutines/CoroSplit.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp llvm/lib/Transforms/Utils/SimplifyIndVar.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/test/CodeGen/AArch64/aarch64-bif-gen.ll llvm/test/CodeGen/AArch64/aarch64-bit-gen.ll llvm/test/CodeGen/AArch64/abs.ll llvm/test/CodeGen/AArch64/arm64-neon-copy.ll llvm/test/CodeGen/AArch64/arm64-neon-simd-ldst-one.ll llvm/test/CodeGen/AArch64/arm64-neon-v8.1a.ll llvm/test/CodeGen/AArch64/arm64-vcvt_f.ll llvm/test/CodeGen/AArch64/arm64-vector-insertion.ll llvm/test/CodeGen/AArch64/bswap.ll llvm/test/CodeGen/AArch64/concat-vector.ll llvm/test/CodeGen/AArch64/double_reduct.ll llvm/test/CodeGen/AArch64/f16-instructions.ll llvm/test/CodeGen/AArch64/faddsub.ll llvm/test/CodeGen/AArch64/fcopysign.ll llvm/test/CodeGen/AArch64/fcvt.ll llvm/test/CodeGen/AArch64/fdiv.ll llvm/test/CodeGen/AArch64/fminimummaximum.ll llvm/test/CodeGen/AArch64/fminmax.ll llvm/test/CodeGen/AArch64/fmla.ll llvm/test/CodeGen/AArch64/fmul.ll llvm/test/CodeGen/AArch64/fptosi-sat-vector.ll llvm/test/CodeGen/AArch64/fptoui-sat-vector.ll llvm/test/CodeGen/AArch64/fptrunc.ll llvm/test/CodeGen/AArch64/fsqrt.ll llvm/test/CodeGen/AArch64/insertextract.ll llvm/test/CodeGen/AArch64/itofp.ll llvm/test/CodeGen/AArch64/llvm.exp10.ll llvm/test/CodeGen/AArch64/popcount.ll llvm/test/CodeGen/AArch64/ptradd.ll llvm/test/CodeGen/AArch64/shift.ll llvm/test/CodeGen/AArch64/store.ll llvm/test/CodeGen/AArch64/vec-combine-compare-to-bitmask.ll llvm/test/CodeGen/AArch64/vecreduce-fadd-strict.ll llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization-nan.ll llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization.ll llvm/test/CodeGen/AArch64/vecreduce-fmaximum.ll llvm/test/CodeGen/AArch64/vecreduce-fmin-legalization.ll llvm/test/CodeGen/AArch64/vecreduce-fminimum.ll llvm/test/CodeGen/AArch64/vecreduce-fmul-strict.ll llvm/test/CodeGen/AArch64/vecreduce-fmul.ll llvm/test/CodeGen/AArch64/vecreduce-umax-legalization.ll llvm/test/CodeGen/AArch64/vector-lrint.ll llvm/test/CodeGen/AMDGPU/frem.ll llvm/test/CodeGen/AMDGPU/llvm.amdgcn.rcp.f16.ll llvm/test/CodeGen/AMDGPU/llvm.amdgcn.rsq.f16.ll llvm/test/CodeGen/AMDGPU/llvm.sqrt.f16.ll llvm/test/CodeGen/AMDGPU/move-to-valu-pseudo-scalar-trans.ll llvm/test/CodeGen/RISCV/rv32xandesperf.ll llvm/test/CodeGen/RISCV/rv64xandesperf.ll llvm/test/CodeGen/X86/avx512vl-intrinsics.ll llvm/test/CodeGen/X86/bmi-select-distrib.ll llvm/test/CodeGen/X86/fold-masked-merge.ll llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll llvm/test/Transforms/InstSimplify/shufflevector.ll llvm/test/Transforms/LoopVectorize/RISCV/partial-reduce-dot-product.ll llvm/test/Transforms/MemCpyOpt/memset-memcpy-oversized.ll llvm/test/Transforms/MemCpyOpt/memset-memcpy-to-2x-memset.ll llvm/test/Transforms/MemCpyOpt/mixed-sizes.ll llvm/test/Transforms/MemCpyOpt/variable-sized-memset-memcpy.ll llvm/tools/llvm-rc/ResourceScriptParser.cpp llvm/tools/llvm-rc/ResourceScriptParser.h llvm/tools/llvm-rc/ResourceScriptStmt.h llvm/tools/llvm-rc/ResourceScriptToken.cpp llvm/tools/llvm-rc/ResourceScriptToken.h llvm/unittests/Analysis/IR2VecTest.cpp mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp offload/plugins-nextgen/common/include/GlobalHandler.h offload/plugins-nextgen/common/src/GlobalHandler.cpp offload/plugins-nextgen/common/src/PluginInterface.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
``````````
</details>
The following files introduce new uses of undef:
- llvm/test/CodeGen/AArch64/arm64-vector-insertion.ll
- llvm/test/Transforms/InstSimplify/shufflevector.ll
[Undef](https://llvm.org/docs/LangRef.html#undefined-values) is now deprecated and should only be used in the rare cases where no replacement is possible. For example, a load of uninitialized memory yields `undef`. You should use `poison` values for placeholders instead.
In tests, avoid using `undef` and having tests that trigger undefined behavior. If you need an operand with some unimportant value, you can add a new argument to the function and use that instead.
For example, this is considered a bad practice:
```llvm
define void @fn() {
...
br i1 undef, ...
}
```
Please use the following instead:
```llvm
define void @fn(i1 %cond) {
...
br i1 %cond, ...
}
```
Please refer to the [Undefined Behavior Manual](https://llvm.org/docs/UndefinedBehavior.html) for more information.
https://github.com/llvm/llvm-project/pull/143592
More information about the llvm-branch-commits
mailing list