[llvm] [VPlan] Use bitfield to store Cmp predicates and GEP wrap flags. (NFC) (PR #181571)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 23:15:00 PST 2026


thurstond wrote:

The MSan buildbot reports use-of-uninitialized memory (https://lab.llvm.org/buildbot/#/builders/164/builds/19321):

```
==opt==826054==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x555560d271b5 in llvm::VPIRFlags::intersectFlags(llvm::VPIRFlags const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:342:73
    #1 0x555560e38269 in llvm::VPlanTransforms::cse(llvm::VPlan&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:2576:19
    #2 0x555560b9715a in llvm::LoopVectorizationPlanner::executePlan(llvm::ElementCount, unsigned int, llvm::VPlan&, llvm::InnerLoopVectorizer&, llvm::DominatorTree*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7465:3
    #3 0x555560bc2c05 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9871:9
    #4 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #5 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #6 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #7 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #8 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #9 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #10 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #11 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #12 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #13 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x55555aa068f7 in __msan_memcpy /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1755:3
    #1 0x555560ba567a in VPRecipeWithIRFlags /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1065:46
    #2 0x555560ba567a in llvm::VPWidenRecipe::VPWidenRecipe(llvm::Instruction&, llvm::ArrayRef<llvm::VPValue*>, llvm::VPIRFlags const&, llvm::VPIRMetadata const&, llvm::DebugLoc) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1732:9
    #3 0x555560d90c50 in llvm::VPWidenRecipe::clone() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1747:18
    #4 0x55556101a3c0 in unrollRecipeByUF /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp:325:28
    #5 0x55556101a3c0 in (anonymous namespace)::UnrollState::unrollBlock(llvm::VPBlockBase*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp:471:5
    #6 0x55556101c231 in (anonymous namespace)::UnrollState::unrollBlock(llvm::VPBlockBase*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp:407:7
    #7 0x555561014700 in llvm::VPlanTransforms::unrollByUF(llvm::VPlan&, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp:508:14
    #8 0x555560b95c29 in runPass<true, void (&)(llvm::VPlan &, unsigned int), unsigned int &> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanTransforms.h:81:12
    #9 0x555560b95c29 in llvm::LoopVectorizationPlanner::executePlan(llvm::ElementCount, unsigned int, llvm::VPlan&, llvm::InnerLoopVectorizer&, llvm::DominatorTree*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7412:3
    #10 0x555560bc2c05 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9871:9
    #11 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #12 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #13 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #14 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #15 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #16 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #17 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #18 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #19 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #20 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x55555aa068f7 in __msan_memcpy /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1755:3
    #1 0x555560ba567a in VPRecipeWithIRFlags /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1065:46
    #2 0x555560ba567a in llvm::VPWidenRecipe::VPWidenRecipe(llvm::Instruction&, llvm::ArrayRef<llvm::VPValue*>, llvm::VPIRFlags const&, llvm::VPIRMetadata const&, llvm::DebugLoc) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1732:9
    #3 0x555560ba3af2 in llvm::VPRecipeBuilder::tryToWiden(llvm::VPInstruction*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7950:16
    #4 0x555560ba8f5f in llvm::VPRecipeBuilder::tryToCreateWidenNonPhiRecipe(llvm::VPSingleDefRecipe*, llvm::VFRange&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8094:10
    #5 0x555560bad3e2 in llvm::LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(std::__1::unique_ptr<llvm::VPlan, std::__1::default_delete<llvm::VPlan>>, llvm::VFRange&, llvm::LoopVersioning*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8295:25
    #6 0x555560b86071 in llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8131:21
    #7 0x555560b84340 in llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6832:9
    #8 0x555560bbfba9 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9644:7
    #9 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #10 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #11 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #12 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #13 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #14 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #15 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #16 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #17 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #18 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x55555aa068f7 in __msan_memcpy /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1755:3
    #1 0x555560d28ea2 in VPRecipeWithIRFlags /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1065:46
    #2 0x555560d28ea2 in llvm::VPInstruction::VPInstruction(unsigned int, llvm::ArrayRef<llvm::VPValue*>, llvm::VPIRFlags const&, llvm::VPIRMetadata const&, llvm::DebugLoc, llvm::Twine const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:428:7
    #3 0x555560d8eb70 in llvm::VPInstruction::clone() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1345:21
    #4 0x555560c83ede in llvm::VPBasicBlock::clone() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:547:30
    #5 0x555560c885f7 in cloneFrom(llvm::VPBlockBase*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:700:30
    #6 0x555560ca7093 in llvm::VPlan::duplicate() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.cpp:1184:32
    #7 0x555560b8601b in llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8132:44
    #8 0x555560b84340 in llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6832:9
    #9 0x555560bbfba9 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9644:7
    #10 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #11 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #12 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #13 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #14 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #15 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #16 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #17 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #18 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #19 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x55555aa068f7 in __msan_memcpy /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1755:3
    #1 0x555560d28ea2 in VPRecipeWithIRFlags /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:1065:46
    #2 0x555560d28ea2 in llvm::VPInstruction::VPInstruction(unsigned int, llvm::ArrayRef<llvm::VPValue*>, llvm::VPIRFlags const&, llvm::VPIRMetadata const&, llvm::DebugLoc, llvm::Twine const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:428:7
    #3 0x555560c2fad9 in llvm::VPBuilder::createNaryOp(unsigned int, llvm::ArrayRef<llvm::VPValue*>, llvm::Instruction*, llvm::VPIRFlags const&, llvm::VPIRMetadata const&, llvm::DebugLoc, llvm::Twine const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h:160:13
    #4 0x555560fe281d in createVPInstructionsForVPBB /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:276:25
    #5 0x555560fe281d in (anonymous namespace)::PlainCFGBuilder::buildPlainCFG() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:320:5
    #6 0x555560fd88ee in llvm::VPlanTransforms::buildVPlan0(llvm::Loop*, llvm::LoopInfo&, llvm::Type*, llvm::DebugLoc, llvm::PredicatedScalarEvolution&, llvm::LoopVersioning*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:600:43
    #7 0x555560b85b90 in llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8116:17
    #8 0x555560b84340 in llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6832:9
    #9 0x555560bbfba9 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9644:7
    #10 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #11 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #12 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #13 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #14 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #15 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #16 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #17 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #18 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #19 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x555560df8c24 in llvm::VPIRFlags::VPIRFlags(llvm::Instruction&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:773:22
    #1 0x555560fe26e8 in createVPInstructionsForVPBB /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:277:38
    #2 0x555560fe26e8 in (anonymous namespace)::PlainCFGBuilder::buildPlainCFG() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:320:5
    #3 0x555560fd88ee in llvm::VPlanTransforms::buildVPlan0(llvm::Loop*, llvm::LoopInfo&, llvm::Type*, llvm::DebugLoc, llvm::PredicatedScalarEvolution&, llvm::LoopVersioning*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:600:43
    #4 0x555560b85b90 in llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8116:17
    #5 0x555560b84340 in llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6832:9
    #6 0x555560bbfba9 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9644:7
    #7 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #8 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #9 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #10 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #11 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #12 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #13 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #14 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #15 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #16 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was stored to memory at
    #0 0x555560d54b7c in llvm::VPIRFlags::FastMathFlagsTy::FastMathFlagsTy(llvm::FastMathFlags const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:2089:14
    #1 0x555560df850e in llvm::VPIRFlags::VPIRFlags(llvm::Instruction&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:773:24
    #2 0x555560fe26e8 in createVPInstructionsForVPBB /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:277:38
    #3 0x555560fe26e8 in (anonymous namespace)::PlainCFGBuilder::buildPlainCFG() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:320:5
    #4 0x555560fd88ee in llvm::VPlanTransforms::buildVPlan0(llvm::Loop*, llvm::LoopInfo&, llvm::Type*, llvm::DebugLoc, llvm::PredicatedScalarEvolution&, llvm::LoopVersioning*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:600:43
    #5 0x555560b85b90 in llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8116:17
    #6 0x555560b84340 in llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6832:9
    #7 0x555560bbfba9 in llvm::LoopVectorizePass::processLoop(llvm::Loop*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9644:7
    #8 0x555560be32e5 in llvm::LoopVectorizePass::runImpl(llvm::Function&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9924:30
    #9 0x555560be5341 in llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9962:32
    #10 0x55555b52c9d0 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #11 0x55555b541cd9 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/PassManager.cpp:127:38
    #12 0x55555b527b90 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:76:38
    #13 0x5555605022c8 in llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/NewPMDriver.cpp:574:7
    #14 0x55555aa81759 in optMain /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/tools/opt/optdriver.cpp:751:10
    #15 0x7ffff782a577  (/lib/x86_64-linux-gnu/libc.so.6+0x2a577) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #16 0x7ffff782a63a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a63a) (BuildId: ae7440bbdce614e0e79280c3b2e45b1df44e639c)
    #17 0x55555a9d3aa4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/opt+0x547faa4)
  Uninitialized value was created by an allocation of 'ref.tmp' in the stack frame
    #0 0x555560df84a4 in llvm::VPIRFlags::VPIRFlags(llvm::Instruction&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h:773:24
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:342:73 in llvm::VPIRFlags::intersectFlags(llvm::VPIRFlags const&)
```


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


More information about the llvm-commits mailing list