This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Constrain reg operands in selectBrJT
ClosedPublic

Authored by paquette on Apr 2 2020, 4:59 PM.

Details

Summary

This was causing a machine verifier failure on the test suite.

Make sure that we don't end up with a weird register class here.

Failure for reference:

    • Bad machine code: Illegal virtual register for instruction ***
  • function: check_constrain
  • basic block: %bb.1 (0x7f8b70839f80)
  • instruction: early-clobber %6:gpr64, early-clobber %7:gpr64sp = JumpTableDest32 %5:gpr64, %1:gpr64sp, %jump-table.0
  • operand 3: %1:gpr64sp

Expected a GPR64 register, but got a GPR64sp register

Diff Detail

Event Timeline

paquette created this revision.Apr 2 2020, 4:59 PM
aemerson accepted this revision.Apr 2 2020, 5:26 PM

LGTM.

This revision is now accepted and ready to land.Apr 2 2020, 5:26 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2020, 8:37 PM