[llvm-dev] What's SEXT_INREG and why DAGCombiner is producing it?

Zhang via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 2 20:07:09 PST 2021


Hi:
In my toy compiler backend, I currently don't / won't support SEXT_IN_REG, mostly due to the lack of documentation explains its difference between the "normal" sext.


However, when compiling a test program, I notice the following messaging emitted by llc, despite already called ``setOperationType() to Expand``:


```
Combining: t41: i32 = sra t40, Constant:i64<31>, .\examples\crc.c:72:12
Creating new node: t44: i32 = sign_extend_inreg t2, ValueType:ch:i1, .\examples\crc.c:72:12
 ... into: t44: i32 = sign_extend_inreg t2, ValueType:ch:i1, .\examples\crc.c:72:12

```


I was under the impression the setOperationType(....EXPAND) call should instruct the ISel System to expand this DAG Node?
Another question would be, what's the correct semantic for SEXT_IN_REG? Can I just  implement it as SExt?




Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211203/acdc5bcb/attachment.html>


More information about the llvm-dev mailing list