[llvm-commits] [PATCH] Preserve sub-registers in PHIElimination
Krister Wombell
kuwerty at gmail.com
Tue Aug 17 22:32:32 PDT 2010
PHI elimination doesn't preserve sub-registers of source operands when
creating copy instructions. As an example take the following PHI
instruction:
%reg1045<def> = PHI %reg3456:v4sub2, <BB#7>, %reg1050, <BB#9>;
GPR:%reg1045,1050 QPR:%reg3456
QPR represents 128 bit registers with 4 x 32 bit sub-registers and GPR
represents single 32 bit registers. The PHI is correct: it's selecting
either a 32 bit register from reg1050 or selecting a 32 bit sub-register of
reg3456.
After PHI elimination BB7 contains:
%reg3566<def> = COPY %reg3456; GPR:%reg3566 QPR:%reg3456
Now there's a copy of a 128 bit register to a 32 bit register but without
any sub-register to determine what is going on.
The patch preserves the sub-registers when creating copy instructions.
Krister
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100818/2a38708d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100818/2a38708d/attachment.obj>
More information about the llvm-commits
mailing list