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.
bug17865.ll
(12979 bytes, application/octet-stream)