[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 23 09:11:22 PDT 2020


sdesmalen marked an inline comment as done.
sdesmalen added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7727
+  Value *Offset = Ops.size() > 3 ? Ops[2] : Builder.getInt32(0);
+  BasePtr = Builder.CreateGEP(MemoryTy, BasePtr, Offset);
+
----------------
efriedma wrote:
> It seems sort of silly to emit a no-op bitcast+gep+bitcast in the `Ops.size() <= 3` case, but I guess it doesn't matter much.
You're right that was a bit silly. I've changed it now.


================
Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_prfb.c:22
+  // expected-error at +1 {{argument value -1 is outside the valid range [0, 13]}}
+  return svprfb(pg, base, -1);
+}
----------------
efriedma wrote:
> Maybe worth adding a negative test for svprfb_vnum?
Yes good catch I've added them. I'm not necessarily sure we also need to add them for all the gather variants as well. I think just having tests where the position of the prefetch specifier is different should be sufficient.


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

https://reviews.llvm.org/D78674





More information about the cfe-commits mailing list