[PATCH] AArch64 Neon Scalar Integer Compare Instructions

mcrosier at codeaurora.org mcrosier at codeaurora.org
Thu Oct 10 16:16:05 PDT 2013


> Hi Chad,
>
> I'm going to be away for the next week, but will try to reply to
> anything you send tomorrow morning before going out of contact.
>
>>   : Pat<(v1i64 (opnode (v1i64 VPR64:$Rn), (v1i64 (bitconvert (v8i8
>> (Neon_movi (i32 0), (i32 timm)))))))
>
> I think you are nearly there, you *should* be able to write something
> like:
>
> def : Pat<(v1i64 (opnode (v1i64 VPR64:$Rn), (v1i64 (bitconvert (v8i8
> (Neon_movi (i32 0), (i32 14))))))),
>     (INSTD VPR64:$Rn, 0)>;
>
> (Probably with a comment that a whole-vector constant 0 currently
> makes its way through codegen as such a MOVIMM (actually, I'd suggest
> a PatFrag or a PatLeaf to abstract it once you've got the basic
> outline working in one example)),
>
> The only problem I see there is that one of the NEON_MOVIMM operands
> is a Constant and the other is a TargetConstant. Frankly, that's dodgy
> anyway. I'd change them both to Constants -- you may need to update
> the patterns for the real MOVI instruction so that they can cope with
> this.
>
> Hopefully that'll work. As I say, I'll be around briefly tomorrow and
> should be able to take another stab at it if not.
>
> Cheers.
>
> Tim.
>

Yup, I was right there!

I've added a leaf pattern, which matches the NEON_MOVIMM operand with all
zeros.  I don't think it needs further documentation, but correct me if
you feel otherwise.  Everything seems to be in working order.

Please have a look and give the LGTM if you're satisfied.

Thanks again, Tim!

 Chad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 000-neon-scalar-arithmetic-llvm.patch
Type: text/x-patch
Size: 28829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131010/6aea26cb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-neon-scalar-compare-clang.patch
Type: text/x-patch
Size: 9420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131010/6aea26cb/attachment-0001.bin>


More information about the llvm-commits mailing list