Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

TailDuplicate makes bad assumption about SSA form #17875

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR17876
Status NEW
Importance P normal
Reported by Justin Holewinski (justin.holewinski@gmail.com)
Reported on 2013-11-11 09:09:40 -0800
Last modified on 2013-11-11 09:13:19 -0800
Version trunk
Hardware PC All
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments bug17865.ll (12979 bytes, application/octet-stream)
Blocks PR17865
Blocked by
See also
Created attachment 11508
Repro for TailDuplicate assert failure

During late machine code optimization with NVPTX, the following code in
TailDuplicate.cpp may be hit:

236├>      MachineInstr *DefMI = MRI->getVRegDef(VReg);

MachineRegisterInfo::getVRegDef() assumes SSA form, but when running
TailDuplicate MRI->isSSA() is false.

For repro, the attached .ll file can be used with the nvptx target with the
following change to NVPTXTargetMachine.cpp:

1. Remove "disablePass(&TailDuplicateID);"

The TailDuplicate pass is currently disabled in NVPTX for a few reasons,
including this one.
Quuxplusone commented 10 years ago

Attached bug17865.ll (12979 bytes, application/octet-stream): Repro for TailDuplicate assert failure