This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Don't try to use GISel if subtarget doesn't have neon or fp.
ClosedPublic

Authored by aemerson on Jul 24 2019, 2:50 PM.

Details

Summary

Throughout the legalizerinfo we currently make the assumption that the target has neon and FP target features available. Fixing it will require a refactor of the whole thing, so until then make sure we fall back.

Works around PR42734

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson created this revision.Jul 24 2019, 2:50 PM
This revision is now accepted and ready to land.Jul 24 2019, 3:47 PM
This revision was automatically updated to reflect the committed changes.
jwf added a subscriber: jwf.Nov 16 2020, 9:37 AM

We're seeing a really odd regression with this diff. If you compile the following code with -target aarch64 -O0 -mgeneral-regs-only

#include <stdbool.h>
bool foo();
bool ice() {
  return foo();  // <- crashes the compiler during instruction selection
}

it crashes the compiler. If you instead make it

#include <stdbool.h>
bool foo();
bool ice() {
  bool b = foo();
  return b; 
}

then it is fine.