[PATCH] [ARMv8] Add NEON intrinsics
Tim Northover
t.p.northover at gmail.com
Tue Sep 3 03:50:06 PDT 2013
Mostly looks fine. Just a few of the vrint ones look like they should map to generic instead of NEON-specific intrinsics. You should probably double-check.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:3005-3009
@@ +3004,7 @@
+ }
+ case ARM::BI__builtin_neon_vrnda_v:
+ case ARM::BI__builtin_neon_vrndaq_v: {
+ Int = Intrinsic::arm_neon_vrinta;
+ return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vrnda");
+ }
+ case ARM::BI__builtin_neon_vrnd_v:
----------------
Isn't this the generic intrinsic @llvm.round?
================
Comment at: lib/CodeGen/CGBuiltin.cpp:3015-3019
@@ +3014,7 @@
+ }
+ case ARM::BI__builtin_neon_vrndm_v:
+ case ARM::BI__builtin_neon_vrndmq_v: {
+ Int = Intrinsic::arm_neon_vrintm;
+ return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vrndm");
+ }
+ case ARM::BI__builtin_neon_vrndp_v:
----------------
I think this is @llvm.floor
================
Comment at: lib/CodeGen/CGBuiltin.cpp:3020-3024
@@ -2915,1 +3019,7 @@
+ }
+ case ARM::BI__builtin_neon_vrndp_v:
+ case ARM::BI__builtin_neon_vrndpq_v: {
+ Int = Intrinsic::arm_neon_vrintp;
+ return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vrndp");
+ }
}
----------------
@llvm.ceil here.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:3010-3014
@@ +3009,7 @@
+ }
+ case ARM::BI__builtin_neon_vrnd_v:
+ case ARM::BI__builtin_neon_vrndq_v: {
+ Int = Intrinsic::arm_neon_vrintz;
+ return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vrnd");
+ }
+ case ARM::BI__builtin_neon_vrndm_v:
----------------
I think this is @llvm.trunc
http://llvm-reviews.chandlerc.com/D1574
More information about the cfe-commits
mailing list