[PATCH] D138418: [LoongArch] Add remaining intrinsics for CRC check instructions
Lu Weining via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 27 17:14:45 PST 2022
SixWeining added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:925
llvm_unreachable("Unexpected Intrinsic.");
- case Intrinsic::loongarch_crc_w_d_w: {
- Results.push_back(DAG.getNode(
- ISD::TRUNCATE, DL, N->getValueType(0),
- DAG.getNode(
- LoongArchISD::CRC_W_D_W, DL, MVT::i64, N->getOperand(2),
- DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(3)))));
- Results.push_back(N->getOperand(0));
- break;
- }
+#define CRC_CASE_EXT_TWOOP(NAME, NODE) \
+ case Intrinsic::loongarch_##NAME: { \
----------------
SixWeining wrote:
> gonglingqin wrote:
> > xen0n wrote:
> > > What's a "two op", are you meaning "binary op" instead?
> > Yes, thank you for your correction!
> Seems the difference is not `binary op` or `unar op`. They are both `binary op`s. The difference is that the former uses 2 `ISD::ANY_EXTEND` while the latter only use one.
@xen0n What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138418/new/
https://reviews.llvm.org/D138418
More information about the cfe-commits
mailing list