[PATCH] D148917: [AArch64][FastISel] Handle CRC32 intrinsics
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 11:10:04 PDT 2023
efriedma added a comment.
Okay. I'm bringing it up because I'd like to make sure fastisel remains limited in scope; we don't have all the GlobalISel infrastructure, so reviewing any additions is significantly more work. (For comparison, globalisel supports these intrinsics with zero globalisel-specific lines of code.)
================
Comment at: llvm/lib/Target/AArch64/AArch64FastISel.cpp:3802
+ MVT VT;
+ if (!isTypeLegal(II->getType(), VT))
+ return false;
----------------
You can assume intrinsics have the type declared in IntrinsicsAArch64.td; I don't think checking the type is legal does anything here.
================
Comment at: llvm/lib/Target/AArch64/AArch64FastISel.cpp:3841
+ Register ResultReg =
+ fastEmitInst_rr(Opc, &AArch64::GPR32RegClass, LHSReg, RHSReg);
+ if (!ResultReg)
----------------
I'm pretty sure fastEmitInst_rr can't fail, so there isn't any reason to null-check the return value. Is this pattern copied from somewhere?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148917/new/
https://reviews.llvm.org/D148917
More information about the llvm-commits
mailing list