[PATCH] D91331: Add hook for target to customize different legalization action according to the input type

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 18:18:51 PST 2020


steven.zhang added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:2980
+  llvm_unreachable("Unexpected lowering");
+  return SDValue();
 }
----------------
nemanjai wrote:
> A return after `llvm_unreachable`? Does the build compiler warn about no return here?
No... Also, there is already such kind of code. See
```
SDValue AArch64TargetLowering::LowerOperation(SDValue Op,
                                              SelectionDAG &DAG) const {
  LLVM_DEBUG(dbgs() << "Custom lowering: ");
  LLVM_DEBUG(Op.dump());

  switch (Op.getOpcode()) {
  default:
    llvm_unreachable("unimplemented operand");
    return SDValue();
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91331/new/

https://reviews.llvm.org/D91331



More information about the llvm-commits mailing list