This is an archive of the discontinued LLVM Phabricator instance.

[ARM GlobalISel] Fix call opcode for Thumb
Needs ReviewPublic

Authored by javed.absar on Nov 8 2017, 10:03 AM.

Details

Reviewers
rovka
Summary

Fixing call opcodes for Thumb.
Review https://reviews.llvm.org/D39592 (Adding legalizer for Thumb) is gated on this patch.

Currently this patch is not complete, and running the test causes assertion failure
"Assertion `RC && RC->isAllocatable() && "Invalid RC for virtual register", so it seems to missing something.
But putting it up to get early feedback if the direction is ok.

Diff Detail

Event Timeline

javed.absar created this revision.Nov 8 2017, 10:03 AM

Gentle reminder.

rovka added inline comments.Nov 10 2017, 10:01 AM
lib/Target/ARM/ARMCallLowering.cpp
424

This isn't correct, you're returning true as if you had lowered the arguments, but you actually haven't done anything with them. You should remove this check altogether.

test/CodeGen/ARM/GlobalISel/arm-call-lowering.ll
1

Typo: DIRECT

Anyway, the "direct" is a property of the code snippet, not of the command line used to run it, so I'm not sure you should include it in the name of the checks. I think what you want here is actually ARM-NOV4T. Similarly below, you can have ARM-V5T and THUMB-V5T.

5

You should also test for thumb + v4t.

30

The CALL-THUMB check seems wrong.