[llvm-commits] [PATCH] Execution domain support for VMOV and VLDR
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Aug 31 08:34:15 PDT 2012
On Aug 31, 2012, at 7:08 AM, Tim Northover <t.p.northover at gmail.com> wrote:
> Hi again,
>
>> You can't add a dependency on a value that isn't there, so you need to know that %s1 is live before you can add the <imp-use> operand.
>>
>> The transformation is safe if you can establish that the original instruction is already reading or writing the other lane.
>
> Just one more quick question that you'll probably know the answer to
> immediately: from these I inferred that there's no easy way to check
> whether %s1 *is* live at that point; I've certainly not seen one in my
> travels, but haven't looked recently. Is that correct?
No easy way, that's right. You would need to scan the instruction stream for evidence. See for example isSafeToClobberEFLAGS() in X86InstrInfo.cpp. As a bonus, you get top deal with sub- and super-registers as well.
> I've not been able to come up with an entirely satisfactory solution
> to this. If I understand correctly, the above instruction wouldn't be
> eligible because D0 is not an implicit-use.
It think that is a bug in ExpandPostRAPseudos.cpp. The original COPY looked like this:
%S2<def> = COPY %S0<kill>, %D1<imp-use,kill>, %D1<imp-def>
Then it was expanded to:
%S2<def> = VMOVS %S0<kill>, pred:14, pred:%noreg, %D1<imp-def>
But either way, the fact the the destination D-register is fully defined by the original instruction should be enough. You can check MI->definedRegister().
/jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120831/525f4ce3/attachment.html>
More information about the llvm-commits
mailing list