[PATCH] AArch64 Neon scalar floating-point to signed/unsigned integer convert instructions

Tim Northover t.p.northover at gmail.com
Thu Oct 10 07:14:57 PDT 2013


Hi Chad,

> I had a great deal of trouble trying to reuse the ARM intrinsics.  If I
> tried to use the overloaded intrinsics I kept hitting an assert in
> CodeGenModule::getIntrinsic(unsigned IID, ArrayRef< llvm::Type * > Tys).
> Specifically, the encoding in it IIT_Table would cause Tys[1] to be
> dereferenced, but the array is of length one.  I'm not exactly sure why
> this is happening or how these tables are encoded.

That's not really enough to go on. It would be useful to know what IID
and Tys you were calling it with. A diff reproducing it would be even
quicker. Oddly, I can only even find an IIT_Table for R600 and MBlaze
in my build directories; I may be looking in the wrong place.

Other than that (and I'm not overly perturbed about using
aarch64-specific ones, I'm still not convinced sharing them was a good
idea any more), there's just one improvement I'd suggest:

+def int_aarch64_neon_vcvtzss: Neon_CvtFPtoIntS_1Arg_Intrinsic;
+def int_aarch64_neon_vcvtzsd: Neon_CvtFPtoIntD_1Arg_Intrinsic;
+def int_aarch64_neon_vcvtzus: Neon_CvtFPtoIntS_1Arg_Intrinsic;
+def int_aarch64_neon_vcvtzud: Neon_CvtFPtoIntD_1Arg_Intrinsic;

I think these ones are actually real fptoui and fptosi instructions.
Unfortunately the others don't seem to match anything already in
generic LLVM.

Cheers.

Tim.



More information about the llvm-commits mailing list