[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

Zoe Carver via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 30 18:00:11 PDT 2020


zoecarver added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1652
+    auto Element = CGF.Builder.CreateGEP(I8Ptr, Index);
+    CGF.Builder.CreateAlignedStore(Zero, Element, MaybeAlign());
+  };
----------------
jfb wrote:
> You should use `alignmentAtOffset` here.
I'm using `CharUnits::One().alignmentAtOffset` to here because this type will always have a size of 1 because it's an `i8` ptr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87974



More information about the cfe-commits mailing list