This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] Fix bug when falling back to DAG ISel

Authored by david-arm on Jun 25 2020, 12:34 AM.



In an earlier commit 584d0d5c1749c13625a5d322178ccb4121eea610 I
added functionality to allow AArch64 CodeGen support for falling
back to DAG ISel when Global ISel encounters scalable vector
types. However, it seems that we were not falling back early
enough as llvm::getLLTForType was still being invoked for scalable
vector types.

I've added a new fallback function to the call lowering class in
order to catch this problem early enough, rather than wait for
lowerFormalArguments to reject scalable vector types.

Diff Detail

Event Timeline

david-arm created this revision.Jun 25 2020, 12:34 AM
Herald added a project: Restricted Project. · View Herald Transcript
david-arm updated this revision to Diff 273342.Jun 25 2020, 7:09 AM
sdesmalen added inline comments.Jul 1 2020, 9:27 AM

Should this function also check the return value?

nit: use llvm::any_of instead of a loop?

david-arm updated this revision to Diff 275082.Jul 2 2020, 6:03 AM
david-arm marked 2 inline comments as done.
david-arm added inline comments.

Strictly speaking we didn't have to catch the return value here as it was being caught by the ret instruction, however it is a nice optimisation to catch it early on here so I've added the check.

sdesmalen accepted this revision.Jul 6 2020, 5:58 AM


This revision is now accepted and ready to land.Jul 6 2020, 5:58 AM
This revision was automatically updated to reflect the committed changes.
david-arm marked an inline comment as done.