[PATCH] AArch64 Neon Scalar Integer Compare Instructions

Tim Northover t.p.northover at gmail.com
Wed Oct 9 08:45:39 PDT 2013


Hi Chad,

> Alternatively, I could add the implicit zero to Ops[] in CGBuiltin.cpp,
> but for some reason that doesn't feel right either.  Maybe it's fine.

I'd say that's the nicer solution. For example it means that if anyone
wrote a vceq_s16 (say) and much later on we could prove the argument
was a constant 0 then we'd still be able to use the "cmeq hN, #0"
form.

Of course, we could add patterns to do that anyway, but I like the
goal of having a minimal set of extra intrinsics. If nothing else
there's a reasonable hope that it would give more of this
serendipitous cross-matching.

>> Possibly modelled as a NEON_VDUP for selection?
>
> I'm not sure I follow.  I'm rather new to this area.

Just musing on what would get through to ISelDAG if you called
"@llvm.aarch64.neon.vcmeq.v1i16(<1 x i16> %lhs, <1 x i16> <i16 0>)".
I'm not really sure myself, though.

Cheers.

Tim.



More information about the llvm-commits mailing list