[ARM GlobalISel] Nothing is legal for Thumb

...yet!

A lot of the current code should be shared for arm and thumb mode, but
until we add tests and work out some of the details (e.g. checking the
correct subtarget feature for G_SDIV) it's safer to bail out as early as
possible for thumb targets.

This should have arguably been part of r348347, which allowed Thumb
functions to be handled by the IR Translator.

llvm-svn: 348472
This commit is contained in:
Diana Picus 2018-12-06 09:26:14 +00:00
parent fe8231ecca
commit 1027249ec9
1 changed files with 7 additions and 0 deletions

View File

@ -75,6 +75,13 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
const LLT s32 = LLT::scalar(32);
const LLT s64 = LLT::scalar(64);
if (ST.isThumb()) {
// FIXME: merge with the code for non-Thumb.
computeTables();
verify(*ST.getInstrInfo());
return;
}
getActionDefinitionsBuilder(G_GLOBAL_VALUE).legalFor({p0});
getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0});