[PATCH] D140160: [llvm][SelectionDAGBuilder] codegen callbr.landingpad intrinsic

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 14:22:59 PST 2023


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:11680
+
+    SDValue V = DAG.getCopyFromReg(Chain, getCurSDLoc(), Output, ResultVTs[i]);
+    ResultValues.push_back(V);
----------------
nickdesaulniers wrote:
> Another issue I'm hitting in real world kernel code is that this MVT is potentially not legal.
> 
> ```
> void strncpy_from_kernel_nofault_count() {
>   asm goto("" : "=r"(*(char *)0) : : : Efault);
> Efault:
> }
> ```
> when target powerpc64le-linux-gnu, the MVT here is i8, but the first legal MVT for the constraint's register class is i32.
Is that the only problem here?  Consider:

```
void test(int *x) {
  asm goto("mov $0, %0" : "=r"(*x) : : : X);
X:;
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140160



More information about the llvm-commits mailing list