[llvm-dev] [RDF] Question about function argument registers on X86
Constable, Scott D via llvm-dev
llvm-dev at lists.llvm.org
Sat Jan 22 13:23:34 PST 2022
Hi,
Given the function:
long simpleExample(long x) {
return x;
}
RDF produces the following data-flow graph:
DFG dump:[
f1: Function: simpleExample
b2: --- %bb.0 --- preds(0): succs(0):
p8: phi [+d9<DIH:0000000000000001>(,,u15"):]
p10: phi [+d11<DIL:0000000000000001>(,,u14"):]
p12: phi [+d13<HDI:0000000000000001>(,,u5"):]
s3: COPY [d4<RAX>(,,u7):, u5"<RDI>(+d13):, u14"<RDI>(+d11):, u15"<RDI>(+d9):]
s6: RET [u7<RAX>!(d4):]
]
Why is the argument in RDI split into three lanes that do not fully span RDI? It would seem more natural to just have a single phi for RDI.
I think the RDF code responsible for this behavior is located here: https://github.com/llvm/llvm-project/blob/55d887b833646baeea0e3371fd2cbbd7550a8d4d/llvm/lib/CodeGen/RDFGraph.cpp#L903, but I admit I do not fully understand what is going on.
Thanks in advance,
Scott Constable
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220122/3cd54a7c/attachment.html>
More information about the llvm-dev
mailing list