HomePhabricator

[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

Description

[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

The way MachinePipeliner uses these target hooks is stateful - we reduce trip
count by one per call to reduceLoopCount. It's a little overfit for hardware
loops, where we don't have to worry about stitching a loop induction variable
across prologs and epilogs (the induction variable is implicit).

This patch introduces a new API:

/// Analyze loop L, which must be a single-basic-block loop, and if the
/// conditions can be understood enough produce a PipelinerLoopInfo object.
virtual std::unique_ptr<PipelinerLoopInfo>
analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

The return value is expected to be an implementation of the abstract class:

/// Object returned by analyzeLoopForPipelining. Allows software pipelining
/// implementations to query attributes of the loop being pipelined.
class PipelinerLoopInfo {
public:
  virtual ~PipelinerLoopInfo();
  /// Return true if the given instruction should not be pipelined and should
  /// be ignored. An example could be a loop comparison, or induction variable
  /// update with no users being pipelined.
  virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

  /// Create a condition to determine if the trip count of the loop is greater
  /// than TC.
  ///
  /// If the trip count is statically known to be greater than TC, return
  /// true. If the trip count is statically known to be not greater than TC,
  /// return false. Otherwise return nullopt and fill out Cond with the test
  /// condition.
  virtual Optional<bool>
  createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                               SmallVectorImpl<MachineOperand> &Cond) = 0;

  /// Modify the loop such that the trip count is
  /// OriginalTC + TripCountAdjust.
  virtual void adjustTripCount(int TripCountAdjust) = 0;

  /// Called when the loop's preheader has been modified to NewPreheader.
  virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

  /// Called when the loop is being removed.
  virtual void disposed() = 0;
};

The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
allowing the target to hold its own state across all calls. This API, in
particular the disjunction of creating a trip count check condition and
adjusting the loop, improves the code quality in ModuloSchedule.cpp.

Details

Committed
jamesmSep 20 2019, 1:57 AM
Parents
rL372375: [CallSiteSplitting] Remove unused includes (NFC).
Branches
Unknown
Tags
Unknown

Event Timeline

hctim added a subscriber: hctim.Sep 20 2019, 1:23 PM

FYI - This broke the ASan buildbots:

FAIL: LLVM :: CodeGen/Hexagon/swp-const-tc2.ll (11330 of 33654)
******************** TEST 'LLVM :: CodeGen/Hexagon/swp-const-tc2.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc -march=hexagon -rdf-opt=0 < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc2.ll | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc2.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==61305==ERROR: AddressSanitizer: use-after-poison on address 0x621000038838 at pc 0x000001e2259b bp 0x7ffc0acc6df0 sp 0x7ffc0acc6de8
READ of size 4 at 0x621000038838 thread T0
    #0 0x1e2259a in getNumOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44
    #1 0x1e2259a in getOperand /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:421
    #2 0x1e2259a in HexagonPipelinerLoopInfo::createTripCountGreaterCondition(int, llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineOperand>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    #3 0x4832808 in llvm::ModuloScheduleExpander::addBranches(llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::DenseMap<unsigned int, unsigned int, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:868:19
    #4 0x48238bc in llvm::ModuloScheduleExpander::generatePipelinedLoop() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:175:3
    #5 0x468527a in llvm::SwingSchedulerDAG::schedule() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:566:9
    #6 0x468019d in llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:402:7
    #7 0x467e770 in llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:224:5
    #8 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #9 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #10 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #11 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #12 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #13 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #14 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #15 0x7fbdbce212e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #16 0x9254e9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x9254e9)

0x621000038838 is located 824 bytes inside of 4096-byte region [0x621000038500,0x621000039500)
allocated by thread T0 here:
    #0 0x9b37b2 in malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
    #1 0xc9748a in safe_malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xc9748a in Allocate /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:99
    #3 0xc9748a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::StartNewSlab() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:400
    #4 0xc971b9 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:260:5
    #5 0x45d2798 in allocate<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096> > /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/ArrayRecycler.h:130:38
    #6 0x45d2798 in allocateOperandArray /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:774
    #7 0x45d2798 in llvm::MachineInstr::MachineInstr(llvm::MachineFunction&, llvm::MCInstrDesc const&, llvm::DebugLoc, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:125
    #8 0x45a5265 in llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&, llvm::DebugLoc const&, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:330:5
    #9 0x61658bf in BuildMI /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:318:37
    #10 0x61658bf in llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:846
    #11 0x5e02cfc in EmitNode /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h:118:7
    #12 0x5e02cfc in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&)::$_1::operator()(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:849
    #13 0x5e00fc6 in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:921:9
    #14 0x603d77c in llvm::SelectionDAGISel::CodeGenAndEmitDAG() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1000:42
    #15 0x60363bd in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1586:7
    #16 0x602c6ed in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:500:3
    #17 0x209392e in llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h:45:23
    #18 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #19 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #20 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #21 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #22 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #23 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #24 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #25 0x7fbdbce212e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: use-after-poison /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44 in getNumOperands
Shadow bytes around the buggy address:
  0x0c427ffff0b0: f7 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00
  0x0c427ffff0c0: 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00 00
  0x0c427ffff0d0: 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 00
  0x0c427ffff0e0: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
  0x0c427ffff0f0: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c427ffff100: 00 f7 f7 f7 f7 f7 f7[f7]f7 f7 f7 f7 00 00 00 00
  0x0c427ffff110: 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 f7 00
  0x0c427ffff120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f7
  0x0c427ffff130: 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00
  0x0c427ffff140: 00 00 f7 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c427ffff150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==61305==ABORTING
FileCheck error: '-' is empty.
FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc2.ll

--

********************
Testing: 0 .. 10.. 20.. 30
FAIL: LLVM :: CodeGen/Hexagon/swp-const-tc3.ll (11338 of 33654)
******************** TEST 'LLVM :: CodeGen/Hexagon/swp-const-tc3.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc -march=hexagon < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc3.ll | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc3.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==61320==ERROR: AddressSanitizer: use-after-poison on address 0x621000043240 at pc 0x000001e2259b bp 0x7ffc07989790 sp 0x7ffc07989788
READ of size 4 at 0x621000043240 thread T0
    #0 0x1e2259a in getNumOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44
    #1 0x1e2259a in getOperand /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:421
    #2 0x1e2259a in HexagonPipelinerLoopInfo::createTripCountGreaterCondition(int, llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineOperand>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    #3 0x4832808 in llvm::ModuloScheduleExpander::addBranches(llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::DenseMap<unsigned int, unsigned int, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:868:19
    #4 0x48238bc in llvm::ModuloScheduleExpander::generatePipelinedLoop() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:175:3
    #5 0x468527a in llvm::SwingSchedulerDAG::schedule() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:566:9
    #6 0x468019d in llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:402:7
    #7 0x467ea1e in llvm::MachinePipeliner::scheduleLoop(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:236:16
    #8 0x467e770 in llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:224:5
    #9 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #10 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #11 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #12 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #13 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #14 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #15 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #16 0x7f1dba35a2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #17 0x9254e9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x9254e9)

0x621000043240 is located 3392 bytes inside of 4096-byte region [0x621000042500,0x621000043500)
allocated by thread T0 here:
    #0 0x9b37b2 in malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
    #1 0xc9748a in safe_malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xc9748a in Allocate /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:99
    #3 0xc9748a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::StartNewSlab() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:400
    #4 0xc971b9 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:260:5
    #5 0x45d2798 in allocate<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096> > /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/ArrayRecycler.h:130:38
    #6 0x45d2798 in allocateOperandArray /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:774
    #7 0x45d2798 in llvm::MachineInstr::MachineInstr(llvm::MachineFunction&, llvm::MCInstrDesc const&, llvm::DebugLoc, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:125
    #8 0x45a5265 in llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&, llvm::DebugLoc const&, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:330:5
    #9 0x61658bf in BuildMI /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:318:37
    #10 0x61658bf in llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:846
    #11 0x5e02cfc in EmitNode /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h:118:7
    #12 0x5e02cfc in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&)::$_1::operator()(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:849
    #13 0x5e00fc6 in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:921:9
    #14 0x603d77c in llvm::SelectionDAGISel::CodeGenAndEmitDAG() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1000:42
    #15 0x60363bd in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1586:7
    #16 0x602c6ed in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:500:3
    #17 0x209392e in llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h:45:23
    #18 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #19 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #20 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #21 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #22 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #23 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #24 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #25 0x7f1dba35a2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: use-after-poison /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44 in getNumOperands
Shadow bytes around the buggy address:
  0x0c42800005f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280000600: 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00
  0x0c4280000610: 00 00 f7 00 00 00 00 00 00 00 00 00 f7 00 00 00
  0x0c4280000620: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
  0x0c4280000630: f7 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00
=>0x0c4280000640: 00 00 f7 f7 f7 f7 f7 f7[f7]f7 f7 f7 f7 00 00 00
  0x0c4280000650: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
  0x0c4280000660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280000670: 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00
  0x0c4280000680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280000690: 00 00 00 00 00 00 00 00 f7 f7 f7 f7 f7 f7 f7 f7
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==61320==ABORTING
FileCheck error: '-' is empty.
FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-const-tc3.ll

--

********************
Testing: 0 .. 10.. 20.. 30
FAIL: LLVM :: CodeGen/Hexagon/swp-memrefs-epilog.ll (11376 of 33654)
******************** TEST 'LLVM :: CodeGen/Hexagon/swp-memrefs-epilog.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc -march=hexagon -O2 -fp-contract=fast < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==61598==ERROR: AddressSanitizer: use-after-poison on address 0x621000042fc8 at pc 0x000001e2259b bp 0x7ffebfa02f90 sp 0x7ffebfa02f88
READ of size 4 at 0x621000042fc8 thread T0
    #0 0x1e2259a in getNumOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44
    #1 0x1e2259a in getOperand /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:421
    #2 0x1e2259a in HexagonPipelinerLoopInfo::createTripCountGreaterCondition(int, llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineOperand>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    #3 0x4832808 in llvm::ModuloScheduleExpander::addBranches(llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::DenseMap<unsigned int, unsigned int, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:868:19
    #4 0x48238bc in llvm::ModuloScheduleExpander::generatePipelinedLoop() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:175:3
    #5 0x468527a in llvm::SwingSchedulerDAG::schedule() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:566:9
    #6 0x468019d in llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:402:7
    #7 0x467e770 in llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:224:5
    #8 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #9 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #10 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #11 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #12 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #13 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #14 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #15 0x7f256bf562e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #16 0x9254e9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x9254e9)

0x621000042fc8 is located 2760 bytes inside of 4096-byte region [0x621000042500,0x621000043500)
allocated by thread T0 here:
    #0 0x9b37b2 in malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
    #1 0xc9748a in safe_malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xc9748a in Allocate /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:99
    #3 0xc9748a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::StartNewSlab() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:400
    #4 0xc971b9 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:260:5
    #5 0x45a5200 in Allocate<llvm::MachineInstr, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096> > /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Recycler.h:89:57
    #6 0x45a5200 in llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&, llvm::DebugLoc const&, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:329
    #7 0x61658bf in BuildMI /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:318:37
    #8 0x61658bf in llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:846
    #9 0x5e02cfc in EmitNode /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h:118:7
    #10 0x5e02cfc in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&)::$_1::operator()(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:849
    #11 0x5e00fc6 in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:921:9
    #12 0x603d77c in llvm::SelectionDAGISel::CodeGenAndEmitDAG() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1000:42
    #13 0x60363bd in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1586:7
    #14 0x602c6ed in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:500:3
    #15 0x209392e in llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h:45:23
    #16 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #17 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #18 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #19 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #20 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #21 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #22 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #23 0x7f256bf562e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: use-after-poison /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44 in getNumOperands
Shadow bytes around the buggy address:
  0x0c42800005a0: 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00 00
  0x0c42800005b0: 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 00
  0x0c42800005c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c42800005d0: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
  0x0c42800005e0: f7 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00
=>0x0c42800005f0: 00 00 00 f7 f7 f7 f7 f7 f7[f7]f7 f7 f7 f7 00 00
  0x0c4280000600: 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00
  0x0c4280000610: f7 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00
  0x0c4280000620: 00 00 00 f7 00 00 00 00 00 00 00 00 00 f7 00 00
  0x0c4280000630: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
  0x0c4280000640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==61598==ABORTING
FileCheck error: '-' is empty.
FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/swp-memrefs-epilog.ll

--

********************
Testing: 0 .. 10.. 20.. 30
FAIL: LLVM :: CodeGen/Hexagon/vect_setcc.ll (11590 of 33654)
******************** TEST 'LLVM :: CodeGen/Hexagon/vect_setcc.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc -march=hexagon < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc.ll | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==63148==ERROR: AddressSanitizer: use-after-poison on address 0x621000044088 at pc 0x000001e2259b bp 0x7fff51d50cd0 sp 0x7fff51d50cc8
READ of size 4 at 0x621000044088 thread T0
    #0 0x1e2259a in getNumOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44
    #1 0x1e2259a in getOperand /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:421
    #2 0x1e2259a in HexagonPipelinerLoopInfo::createTripCountGreaterCondition(int, llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineOperand>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    #3 0x4832808 in llvm::ModuloScheduleExpander::addBranches(llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::DenseMap<unsigned int, unsigned int, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:868:19
    #4 0x48238bc in llvm::ModuloScheduleExpander::generatePipelinedLoop() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:175:3
    #5 0x468527a in llvm::SwingSchedulerDAG::schedule() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:566:9
    #6 0x468019d in llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:402:7
    #7 0x467e770 in llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:224:5
    #8 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #9 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #10 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #11 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #12 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #13 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #14 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #15 0x7f01742402e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #16 0x9254e9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x9254e9)

0x621000044088 is located 1928 bytes inside of 4096-byte region [0x621000043900,0x621000044900)
allocated by thread T0 here:
    #0 0x9b37b2 in malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
    #1 0xc9748a in safe_malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xc9748a in Allocate /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:99
    #3 0xc9748a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::StartNewSlab() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:400
    #4 0xc971b9 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:260:5
    #5 0x45d1c24 in allocate<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096> > /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/ArrayRecycler.h:130:38
    #6 0x45d1c24 in allocateOperandArray /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:774
    #7 0x45d1c24 in llvm::MachineInstr::addOperand(llvm::MachineFunction&, llvm::MachineOperand const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:246
    #8 0x6045a8c in addMBB /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:139:9
    #9 0x6045a8c in llvm::SelectionDAGISel::FinishBasicBlock() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1711
    #10 0x603660a in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1597:5
    #11 0x602c6ed in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:500:3
    #12 0x209392e in llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h:45:23
    #13 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #14 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #15 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #16 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #17 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #18 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #19 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #20 0x7f01742402e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: use-after-poison /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44 in getNumOperands
Shadow bytes around the buggy address:
  0x0c42800007c0: 00 00 f7 00 00 00 00 00 00 00 00 00 f7 00 00 00
  0x0c42800007d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 f7 00 00
  0x0c42800007e0: 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00
  0x0c42800007f0: 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00
  0x0c4280000800: 00 00 f7 00 00 00 00 00 00 00 00 f7 f7 f7 f7 f7
=>0x0c4280000810: f7[f7]f7 f7 f7 f7 00 00 00 00 00 00 00 00 f7 00
  0x0c4280000820: 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00
  0x0c4280000830: 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00
  0x0c4280000840: 00 00 00 f7 00 00 00 00 00 00 00 00 f7 00 00 00
  0x0c4280000850: 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 00
  0x0c4280000860: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==63148==ABORTING
FileCheck error: '-' is empty.
FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc.ll

--

********************
Testing: 0 .. 10.. 20.. 30
FAIL: LLVM :: CodeGen/Hexagon/vect_setcc_v2i16.ll (11614 of 33654)
******************** TEST 'LLVM :: CodeGen/Hexagon/vect_setcc_v2i16.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc -march=hexagon < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc_v2i16.ll | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc_v2i16.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==63137==ERROR: AddressSanitizer: use-after-poison on address 0x621000046ea0 at pc 0x000001e2259b bp 0x7fff7abde9f0 sp 0x7fff7abde9e8
READ of size 4 at 0x621000046ea0 thread T0
    #0 0x1e2259a in getNumOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44
    #1 0x1e2259a in getOperand /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:421
    #2 0x1e2259a in HexagonPipelinerLoopInfo::createTripCountGreaterCondition(int, llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineOperand>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    #3 0x4832808 in llvm::ModuloScheduleExpander::addBranches(llvm::MachineBasicBlock&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, llvm::DenseMap<unsigned int, unsigned int, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:868:19
    #4 0x48238bc in llvm::ModuloScheduleExpander::generatePipelinedLoop() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/ModuloSchedule.cpp:175:3
    #5 0x468527a in llvm::SwingSchedulerDAG::schedule() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:566:9
    #6 0x468019d in llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:402:7
    #7 0x467e770 in llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp:224:5
    #8 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #9 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #10 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #11 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #12 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #13 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #14 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #15 0x7f90f12bd2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #16 0x9254e9 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x9254e9)

0x621000046ea0 is located 3488 bytes inside of 4096-byte region [0x621000046100,0x621000047100)
allocated by thread T0 here:
    #0 0x9b37b2 in malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
    #1 0xc9748a in safe_malloc /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xc9748a in Allocate /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:99
    #3 0xc9748a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::StartNewSlab() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:400
    #4 0xc971b9 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:260:5
    #5 0x45a5200 in Allocate<llvm::MachineInstr, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096> > /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Recycler.h:89:57
    #6 0x45a5200 in llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&, llvm::DebugLoc const&, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:329
    #7 0x61658bf in BuildMI /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:318:37
    #8 0x61658bf in llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:846
    #9 0x5e02cfc in EmitNode /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h:118:7
    #10 0x5e02cfc in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&)::$_1::operator()(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>, llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:849
    #11 0x5e00fc6 in llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:921:9
    #12 0x603d77c in llvm::SelectionDAGISel::CodeGenAndEmitDAG() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1000:42
    #13 0x60363bd in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1586:7
    #14 0x602c6ed in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:500:3
    #15 0x209392e in llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h:45:23
    #16 0x45c65aa in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
    #17 0x50a70b3 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
    #18 0x50a7932 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
    #19 0x50a880d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
    #20 0x50a880d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
    #21 0x9fc9bc in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
    #22 0x9f5c50 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
    #23 0x7f90f12bd2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: use-after-poison /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:414:44 in getNumOperands
Shadow bytes around the buggy address:
  0x0c4280000d80: 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 f7
  0x0c4280000d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280000da0: f7 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00
  0x0c4280000db0: 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00 00
  0x0c4280000dc0: 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 f7 f7
=>0x0c4280000dd0: f7 f7 f7 f7[f7]f7 f7 f7 f7 00 00 00 00 00 00 00
  0x0c4280000de0: 00 f7 00 00 00 00 00 00 00 00 00 f7 00 00 00 00
  0x0c4280000df0: 00 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00
  0x0c4280000e00: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 f7
  0x0c4280000e10: 00 00 00 00 00 00 00 00 f7 f7 f7 f7 f7 f7 f7 f7
  0x0c4280000e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==63137==ABORTING
FileCheck error: '-' is empty.
FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/Hexagon/vect_setcc_v2i16.ll

--

********************
Testing: 0 .. 10.. 20.. 30.. 
FAIL: LLVM :: CodeGen/PowerPC/sms-phi-5.ll (13804 of 33654)
******************** TEST 'LLVM :: CodeGen/PowerPC/sms-phi-5.ll' FAILED ********************
Script:
--
: 'RUN: at line 2';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/PowerPC/sms-phi-5.ll -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs       -mcpu=pwr9 --ppc-enable-pipeliner 2>&1 | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/PowerPC/sms-phi-5.ll
--
Exit Code: 1

Command Output (stderr):
--
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/PowerPC/sms-phi-5.ll:6:16: error: CHECK-LABEL: expected string not found in input
; CHECK-LABEL: phi5:
               ^
<stdin>:1:1: note: scanning from here
=================================================================
^
<stdin>:2:45: note: possible intended match here
==18466==ERROR: AddressSanitizer: use-after-poison on address 0x621000043d08 at pc 0x000002768c3d bp 0x7fff3d2cc430 sp 0x7fff3d2cc428
                                            ^

--

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Testing Time: 315.05s
********************
Failing Tests (6):
    LLVM :: CodeGen/Hexagon/swp-const-tc2.ll
    LLVM :: CodeGen/Hexagon/swp-const-tc3.ll
    LLVM :: CodeGen/Hexagon/swp-memrefs-epilog.ll
    LLVM :: CodeGen/Hexagon/vect_setcc.ll
    LLVM :: CodeGen/Hexagon/vect_setcc_v2i16.ll
    LLVM :: CodeGen/PowerPC/sms-phi-5.ll

Thanks for pushing the revert. Apologies!

hctim added a comment.Sep 20 2019, 1:56 PM

No problem! The Sanitizer bots are notoriously hard to reproduce - if you'd like to repro the best instructions I can give are at https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild :)