[PATCH] D73948: [GlobalISel] Legalize more G_FP(EXT|TRUNC) libcalls.
Konstantin Schwarz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 05:13:45 PST 2020
kschwarz added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:118
+static Type *getFloatTypeForSizeInBits(LLVMContext &Ctx, unsigned Size) {
+ switch (Size) {
----------------
arsenm wrote:
> It might be better to pass the LLT instead of just the size in case new exotic LLTs are introduced for weird FP types in the future
Makes sense
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:129
+ default:
+ llvm_unreachable("unexpected floating-point type");
+ }
----------------
arsenm wrote:
> Return null and report legalization failure?
Definitely better than crashing. It requires all call sites to handle the nullptr though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73948/new/
https://reviews.llvm.org/D73948
More information about the llvm-commits
mailing list