https://llvm.org/bugs/show_bug.cgi?id=30798
Bug ID: 30798 Summary: VirtRegRewriter fails to set properties on BUNDLE instructions Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Register Allocator Assignee: unassignedb...@nondot.org Reporter: mattias.v.eriks...@ericsson.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified In my out-of-tree back-end we run the register allocator after bundling of instructions. The register allocator handles this mostly fine, but I think there is a bug related to imp-use on subregister definitions: # *** IR Dump Before Virtual Register Rewriter ***: BUNDLE %vreg1<imp-def> * %vreg1:hiAcc<def> = ... %vreg1 is a register pair which consists of hiAcc and loAcc. It is allocated %a32, in which %a3 is hiAcc. After register allocation imp-use is added on the bundled instruction but not on the BUNDLE head. # *** IR Dump After Virtual Register Rewriter ***: BUNDLE %a32<imp-def> * %a3<def> = ... %a32<imp-use> I think %a32<imp-use> should be added to the BUNDLE head: BUNDLE %a32<imp-def>, %a32<imp-use> * %a3<def> = ... %a32<imp-use> The relevant code is in VirtRegRewriter::rewrite(): // Add any missing super-register kills after rewriting the whole // instruction. while (!SuperKills.empty()) MI->addRegisterKilled(SuperKills.pop_back_val(), TRI, true); while (!SuperDeads.empty()) MI->addRegisterDead(SuperDeads.pop_back_val(), TRI, true); while (!SuperDefs.empty()) MI->addRegisterDefined(SuperDefs.pop_back_val(), TRI); Should this be updated to also add the relevant flags on the bundle head? -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs