[llvm] [LV][VPlan] Extract the implementation of transform Recipe to EVLRecipe into a small function. NFC (PR #119510)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 16:50:47 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `llvm` at step 12 "build-stage2-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/6873

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 12 (build-stage2-unified-tree) failure: build (failure)
...
14.321 [1/8/15] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTPropertiesEmitter.cpp.o
16.517 [1/7/16] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/SveEmitter.cpp.o
20.288 [1/6/17] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOptionDocEmitter.cpp.o
26.265 [1/5/18] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpenCLBuiltinEmitter.cpp.o
35.978 [1/4/19] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
52.078 [1/3/20] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/MveEmitter.cpp.o
57.159 [1/2/21] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o
80.669 [1/1/22] Building CXX object tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o
80.725 [0/1/23] Linking CXX executable bin/clang-tblgen
166.800 [3911/637/1827] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanTransforms.cpp.o
FAILED: lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanTransforms.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/install/stage1/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/lib/Transforms/Vectorize -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanTransforms.cpp.o -MF lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanTransforms.cpp.o.d -o lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanTransforms.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1495:28: error: variable 'VPID' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
 1495 |             else if (auto *CastR = dyn_cast<VPWidenCastRecipe>(CR))
      |                            ^~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/ADT/TypeSwitch.h:102:22: note: in instantiation of function template specialization 'createEVLRecipe(VPValue *, VPRecipeBase &, VPTypeAnalysis &, VPValue &, VPValue &)::(anonymous class)::operator()<llvm::VPWidenIntrinsicRecipe>' requested here
  102 |       result.emplace(caseFn(caseValue));
      |                      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/ADT/TypeSwitch.h:46:29: note: in instantiation of function template specialization 'llvm::TypeSwitch<llvm::VPRecipeBase *, llvm::VPRecipeBase *>::Case<llvm::VPWidenIntrinsicRecipe, (lambda at /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1490:11) &>' requested here
   46 |     return derived.template Case<CaseT>(caseFn)
      |                             ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1489:8: note: in instantiation of function template specialization 'llvm::detail::TypeSwitchBase<llvm::TypeSwitch<llvm::VPRecipeBase *, llvm::VPRecipeBase *>, llvm::VPRecipeBase *>::Case<llvm::VPWidenIntrinsicRecipe, llvm::VPWidenCastRecipe, (lambda at /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1490:11)>' requested here
 1489 |       .Case<VPWidenIntrinsicRecipe, VPWidenCastRecipe>(
      |        ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1497:20: note: uninitialized use occurs here
 1497 |             assert(VPID != Intrinsic::not_intrinsic && "Expected VP intrinsic");
      |                    ^~~~
/usr/include/assert.h:90:27: note: expanded from macro 'assert'
   90 |      (static_cast <bool> (expr)                                         \
      |                           ^~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1495:18: note: remove the 'if' if its condition is always true
 1495 |             else if (auto *CastR = dyn_cast<VPWidenCastRecipe>(CR))
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1496 |               VPID = VPIntrinsic::getForOpcode(CastR->getOpcode());
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1491:31: note: initialize the variable 'VPID' to silence this warning
 1491 |             Intrinsic::ID VPID;
      |                               ^
      |                                = 0
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1495:28: error: variable 'VPID' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
 1495 |             else if (auto *CastR = dyn_cast<VPWidenCastRecipe>(CR))
      |                            ^~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/ADT/TypeSwitch.h:102:22: note: in instantiation of function template specialization 'createEVLRecipe(VPValue *, VPRecipeBase &, VPTypeAnalysis &, VPValue &, VPValue &)::(anonymous class)::operator()<llvm::VPWidenCastRecipe>' requested here
  102 |       result.emplace(caseFn(caseValue));
      |                      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/ADT/TypeSwitch.h:47:19: note: in instantiation of function template specialization 'llvm::TypeSwitch<llvm::VPRecipeBase *, llvm::VPRecipeBase *>::Case<llvm::VPWidenCastRecipe, (lambda at /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1490:11) &>' requested here
   47 |         .template Case<CaseT2, CaseTs...>(caseFn);
      |                   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1489:8: note: in instantiation of function template specialization 'llvm::detail::TypeSwitchBase<llvm::TypeSwitch<llvm::VPRecipeBase *, llvm::VPRecipeBase *>, llvm::VPRecipeBase *>::Case<llvm::VPWidenIntrinsicRecipe, llvm::VPWidenCastRecipe, (lambda at /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1490:11)>' requested here
 1489 |       .Case<VPWidenIntrinsicRecipe, VPWidenCastRecipe>(

```

</details>

https://github.com/llvm/llvm-project/pull/119510


More information about the llvm-commits mailing list