[ARM] GlobalISel: Legalize 64-bit G_FADD and G_LOAD
For now we just mark them as legal all the time and let the other passes bail
out if they can't handle it. In the future, we'll want to move more of the
brains into the legalizer.
llvm-svn: 295300
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index af44cbf..a4f93b4 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -32,6 +32,7 @@
const LLT s8 = LLT::scalar(8);
const LLT s16 = LLT::scalar(16);
const LLT s32 = LLT::scalar(32);
+ const LLT s64 = LLT::scalar(64);
setAction({G_FRAME_INDEX, p0}, Legal);
@@ -39,6 +40,11 @@
setAction({G_LOAD, Ty}, Legal);
setAction({G_LOAD, 1, p0}, Legal);
+ // FIXME: This is strictly for loading double-precision floating point values,
+ // if the hardware allows it. We rely on the instruction selector to complain
+ // otherwise.
+ setAction({G_LOAD, s64}, Legal);
+
for (auto Ty : {s1, s8, s16, s32})
setAction({G_ADD, Ty}, Legal);
@@ -51,6 +57,7 @@
// FIXME: This is a bit sloppy, but for now we'll just rely on the instruction
// selector to complain if it doesn't support floating point.
setAction({G_FADD, s32}, Legal);
+ setAction({G_FADD, s64}, Legal);
computeTables();
}