[PATCH] D70297: [ARM,MVE] Add intrinsics for vector comparisons.

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 06:13:17 PST 2019


simon_tatham marked 2 inline comments as done.
simon_tatham added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:6798
 
+static llvm::Value *ARMMVEDupVector(CGBuilderTy &Builder, llvm::Value *V) {
+  // Helper function to duplicate a scalar value V into all lanes of an MVE
----------------
dmgreen wrote:
> Is this the same as or similar enough to CreateVectorSplat to use that instead?
Ah, thank you – I can see why I didn't find it under that name! I looked for all sorts of things like "dup" or "rep", and then gave up and painstakingly copied the long-winded IR I'd seen in an existing example. "splat" is one of those words you have no trouble finding //after// you know it's the word you're looking for...

Now I know there's an existing function that will do the job, I agree that I should use it (if only because it'll produce the most idiomatic one of the various synonymous IR representations). But I think I'll keep the wrapping helper function, because it's still useful to have it auto-compute the unique correct element count for an MVE vector – that will keep the call sites terse in `arm_mve.td`, and I expect there will be lots of those.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:3311
   }
+  case Intrinsic::arm_mve_pred_i2v: {
+    Value *Arg = II->getArgOperand(0);
----------------
dmgreen wrote:
> This can be a separate change.
OK, will do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70297/new/

https://reviews.llvm.org/D70297





More information about the cfe-commits mailing list