This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Copy machine operand flags in TII::insertBranch
ClosedPublic

Authored by asavonic on Nov 2 2021, 4:13 AM.

Details

Summary

Before this patch, flags such as undef were dropped by TII::insertBranch
(used by BranchFolding pass), resulting in the following error from
machine verifier:

*** Bad machine code: Reading virtual register without a def ***
- function:    hoge
- basic block: %bb.0 bb (0x562e9c240e68)
- instruction: CBranch %2:int1regs, %bb.3          // <--- no undef flag
- operand 0:   %2:int1regs

Diff Detail

Event Timeline

asavonic created this revision.Nov 2 2021, 4:13 AM
asavonic requested review of this revision.Nov 2 2021, 4:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2021, 4:13 AM
asavonic edited the summary of this revision. (Show Details)Nov 2 2021, 4:14 AM
tra accepted this revision.Nov 2 2021, 4:44 PM
This revision is now accepted and ready to land.Nov 2 2021, 4:44 PM
This revision was landed with ongoing or failed builds.Nov 3 2021, 2:39 AM
This revision was automatically updated to reflect the committed changes.