LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 27856 - Crash in handleMove during scheduling of OpenCV kernel
Summary: Crash in handleMove during scheduling of OpenCV kernel
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Register Allocator (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Matthias Braun
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 12:28 PDT by Matt Arsenault
Modified: 2016-05-24 16:55 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
Testcase with new opt passes run (16.14 KB, application/octet-stream)
2016-05-24 12:28 PDT, Matt Arsenault
Details
Reduced testcase with verifier error (1.73 KB, application/octet-stream)
2016-05-24 12:29 PDT, Matt Arsenault
Details
Original testcase without new opt passes run for reference (16.23 KB, application/octet-stream)
2016-05-24 12:31 PDT, Matt Arsenault
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Arsenault 2016-05-24 12:28:40 PDT
Created attachment 16406 [details]
Testcase with new opt passes run

This crashes the original testcase when http://reviews.llvm.org/D20304 is applied.

A reduced version hits a verifier error instead after scheduling.




llc: /home/matt/src/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1066: void llvm::LiveIntervals::HMEditor::handleMoveDown(llvm::LiveRange&): Assertion `OldIdxVNI->def == OldIdxOut->start && "Inconsistent def"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff671e295 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff671e295 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff671f6da in abort () from /usr/lib/libc.so.6
#2  0x00007ffff6717297 in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff6717342 in __assert_fail () from /usr/lib/libc.so.6
#4  0x0000000001d74af7 in llvm::LiveIntervals::HMEditor::handleMoveDown (this=0x7fffffffca00, LR=...) at /home/matt/src/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1066
#5  0x0000000001d7465a in llvm::LiveIntervals::HMEditor::updateRange (this=0x7fffffffca00, LR=..., Reg=2147484174, LaneMask=0) at /home/matt/src/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:996
#6  0x0000000001d74394 in llvm::LiveIntervals::HMEditor::updateAllRanges (this=0x7fffffffca00, MI=0x46a3ec0) at /home/matt/src/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:964
#7  0x0000000001d71bc2 in llvm::LiveIntervals::handleMove (this=0x461bd00, MI=..., UpdateFlags=true) at /home/matt/src/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1380
#8  0x0000000001e23f1d in llvm::ScheduleDAGMI::moveInstruction (this=0x46dd0d0, MI=0x46a3ec0, InsertPos=...) at /home/matt/src/llvm/lib/CodeGen/MachineScheduler.cpp:655
#9  0x0000000001e279f1 in llvm::ScheduleDAGMILive::scheduleMI (this=0x46dd0d0, SU=0x46ecbc0, IsTopNode=false) at /home/matt/src/llvm/lib/CodeGen/MachineScheduler.cpp:1327
#10 0x0000000001e26973 in llvm::ScheduleDAGMILive::schedule (this=0x46dd0d0) at /home/matt/src/llvm/lib/CodeGen/MachineScheduler.cpp:1122
#11 0x0000000001e23690 in (anonymous namespace)::MachineSchedulerBase::scheduleRegions (this=0x461c650, Scheduler=..., FixKillFlags=false) at /home/matt/src/llvm/lib/CodeGen/MachineScheduler.cpp:492
#12 0x0000000001e22a52 in (anonymous namespace)::MachineScheduler::runOnMachineFunction (this=0x461c650, mf=...) at /home/matt/src/llvm/lib/CodeGen/MachineScheduler.cpp:357
#13 0x0000000001decb98 in llvm::MachineFunctionPass::runOnFunction (this=0x461c690, F=...) at /home/matt/src/llvm/lib/CodeGen/MachineFunctionPass.cpp:60
#14 0x00000000020f2957 in llvm::FPPassManager::runOnFunction (this=0x45d1d80, F=...) at /home/matt/src/llvm/lib/IR/LegacyPassManager.cpp:1526
#15 0x00000000020f2ace in llvm::FPPassManager::runOnModule (this=0x45d1d80, M=...) at /home/matt/src/llvm/lib/IR/LegacyPassManager.cpp:1547
#16 0x00000000020f2e1b in (anonymous namespace)::MPPassManager::runOnModule (this=0x45ed4b0, M=...) at /home/matt/src/llvm/lib/IR/LegacyPassManager.cpp:1603
#17 0x00000000020f34cd in llvm::legacy::PassManagerImpl::run (this=0x45e9c40, M=...) at /home/matt/src/llvm/lib/IR/LegacyPassManager.cpp:1706
#18 0x00000000020f36d9 in llvm::legacy::PassManager::run (this=0x7fffffffd5a0, M=...) at /home/matt/src/llvm/lib/IR/LegacyPassManager.cpp:1737
#19 0x0000000000d2bcfe in compileModule (argv=0x7fffffffdfe8, Context=...) at /home/matt/src/llvm/tools/llc/llc.cpp:465
#20 0x0000000000d2a804 in main (argc=8, argv=0x7fffffffdfe8) at /home/matt/src/llvm/tools/llc/llc.cpp:244
Comment 1 Matt Arsenault 2016-05-24 12:29:53 PDT
Created attachment 16407 [details]
Reduced testcase with verifier error

Run with llc -march=amdgcn -mcpu=hawaii -verify-machineinstrs
Comment 2 Matt Arsenault 2016-05-24 12:31:28 PDT
Created attachment 16408 [details]
Original testcase without new opt passes run for reference

This does not crash on trunk without the new passes run
Comment 3 Matthias Braun 2016-05-24 16:55:15 PDT
Thanks for the report and the reduced testcase. I just pushed a fix in r270619 which passes all three testcases.