[llvm-dev] PHI node to different register class vs TailDuplication

Matthias Braun via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 4 16:36:26 PST 2016


A PHI can be thought of - and will be lowered to - COPY instructions at the end of the respective predecessor blocks. So what you need in the example is that a COPY instruction from class "aNlh_0_7" to class "rN" is valid and that a COPY from class "aNlh_rN" to class "rN" is valid.

- Matthias

> On Mar 4, 2016, at 11:09 AM, Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> On 3/4/2016 6:44 AM, Mikael Holmén via llvm-dev wrote:
>> 
>> Is such a PHI node ok?
> 
> That doesn't seem to be well documented. The PHI nodes are described as "representing an assignment", but what the "assignment" could be is not clear.  Even if there exists an instruction that could copy registers between register classes, if you cannot substitute the output operand with one of the input operands in any use of the output, the PHI would seem to be malformed.  At least, that is my interpretation.
> 
> -Krzysztof
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list