simon_tatham added inline comments.

================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:10366
+    auto Alignment = CGM.getNaturalPointeeTypeAlignment(
+        E->getArg(0)->IgnoreParenCasts()->getType());
     Ops[0] = Builder.CreateBitCast(Ops[0], llvm::PointerType::getUnqual(VTy));
----------------
What effect is this change of strategy having on the alignment computation, for 
the already-supported instances of this builtin?

It //looks// to me as if `__builtin_neon_vld1_v` with (say) a `uint8_t *` 
pointer argument will now compute `Alignment=1` (the natural alignment of the 
pointee type), whereas it would previously have computed `Alignment=8` (the 
size of the whole vector being loaded or stored).

Is that intentional? Or accidental? Or have I completely misunderstood what's 
going on?

(Whichever of the three, some discussion in the commit message would be a good 
idea, explaining why this change does or does not make a difference, as 
appropriate.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80716



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to