This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] PointerRegClass should be GPR64spRegClass
AbandonedPublic

Authored by kongyi on Jun 19 2017, 2:35 PM.

Details

Summary

XZR cannot be used to hold pointers, while SP can. Change the pointer register class from GPR64RegClass to GPR64spRegClass, which includes SP but excludes XZR.

Diff Detail

Event Timeline

kongyi created this revision.Jun 19 2017, 2:35 PM

Testcase? (I think this affects inline asm.)

Testcase? (I think this affects inline asm.)

This change is actually laying ground for fixing an inline asm bug (PR33134). Test cases will be added along with rest of the fix in a follow up change.

mcrosier resigned from this revision.Jun 20 2017, 6:26 AM
mcrosier edited reviewers, added: MatzeB, qcolombet; removed: mcrosier.
kongyi updated this revision to Diff 103670.Jun 22 2017, 5:07 PM
kongyi retitled this revision from [AArch64] PointerRegClass should not include XZR to [AArch64] PointerRegClass should be GPR64spRegClass.
kongyi edited the summary of this revision. (Show Details)
kristof.beyls edited edge metadata.Jun 23 2017, 7:43 AM

Testcase? (I think this affects inline asm.)

This change is actually laying ground for fixing an inline asm bug (PR33134). Test cases will be added along with rest of the fix in a follow up change.

This seems to be a fix for a correctness bug. If you do have a follow-up change that will have test cases that demonstrate this fixes things, maybe it's best to combine this change with the follow up change, especially since this patch is a single-line change?

kongyi abandoned this revision.Jul 4 2017, 6:58 PM

Will combine the changes into a single patch.