This is an archive of the discontinued LLVM Phabricator instance.

[ARM] mark tMOVi32imm as killing flags
ClosedPublic

Authored by simonwallis2 on Jul 10 2023, 7:06 AM.

Details

Summary

Mark the tMOVi32imm pseudo instr as killing the flags register.

The pseudo instruction expands to a sequence of 7 movs/lsls/adds
instructions, which are all Thumb-1 flag setting instructions.

For a test case, take an existing arm test which checks for
"Don't CSE a cmp across a call that clobbers CPSR."
and retarget it at thumbv6m execute-only.

Diff Detail

Event Timeline

simonwallis2 created this revision.Jul 10 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 7:06 AM
simonwallis2 requested review of this revision.Jul 10 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 7:06 AM
stuij requested changes to this revision.Jul 11 2023, 1:49 AM
stuij added inline comments.
llvm/test/CodeGen/ARM/udivmodei5.ll
2 ↗(On Diff #538623)

I would add a comment explaining why we're testing with XO here, as otherwise there's no way to guess the intent.

This revision now requires changes to proceed.Jul 11 2023, 1:49 AM

Addressed review feedback by adding comment to test case.

simonwallis2 marked an inline comment as done.Jul 11 2023, 2:12 AM
stuij added inline comments.Jul 11 2023, 2:16 AM
llvm/test/CodeGen/ARM/udivmodei5.ll
2 ↗(On Diff #538623)

perhaps be a bit more specific? to me stating the error message can still mean just about anything.

removed incidental test case udivmodei5.ll, which was less important than the targeted test case cse-call.ll

stuij accepted this revision.Jul 11 2023, 3:36 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 11 2023, 3:36 AM
This revision was automatically updated to reflect the committed changes.