[PATCH] Implement aarch64 neon instruction class SIMD copy - Clang

Hao Liu Hao.Liu at arm.com
Thu Oct 10 08:29:37 PDT 2013


Hi Kevin,

There are two points of hard code in shared functions:

+    //To avoid argument being multiple defined, add extra number for renaming.
+    if (name == "vcopy_lane")
+      s.push_back('1');

+    bool extranumber = false;
+    if(name == "vcopy_lane")
+      extranumber = true;
 
     s += TypeString(proto[i], typestr) + " __";
     s.push_back(arg);
+    if(extranumber)
+      s.push_back('1');
     s += " = (";
     s.push_back(arg);
+    if(extranumber)
+      s.push_back('1');


I think maybe this is not necessary. Because you can achieve renaming in function GenOpString(name, op, proto, typestr).
As this function has passed the "name", you can handle renaming under the switch case of OpCopy like:

case OpCopy: {
    if (name == "vcopy_lane") {
        renaming ....
   } 
 }

-----Original Message-----
From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Kevin Qin
Sent: Tuesday, October 08, 2013 6:34 AM
To: kevinqindev at gmail.com; t.p.northover at gmail.com
Cc: llvm-commits at cs.uiuc.edu; cfe-commits at cs.uiuc.edu
Subject: [PATCH] Implement aarch64 neon instruction class SIMD copy - Clang

Implemented related ACLE intrinsic : vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n

Please review, thanks.

http://llvm-reviews.chandlerc.com/D1855

Files:
  include/clang/Basic/arm_neon.td
  lib/CodeGen/CGBuiltin.cpp
  test/CodeGen/aarch64-neon-copy.c
  utils/TableGen/NeonEmitter.cpp






More information about the llvm-commits mailing list