[PATCH] D105097: [clang][AArch64][SVE] Handle PRValue under VLAT <-> VLST cast

JunMa via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 29 19:13:07 PDT 2021


junparser added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2120
+      } else
+        Addr = EmitLValue(E).getAddress(CGF);
       Addr = Builder.CreateElementBitCast(Addr, CGF.ConvertTypeForMem(DestTy));
----------------
efriedma wrote:
> I don't think it's legal to use EmitLValue here at all; the emitted IR could have side-effects.
> 
> Since we have the vector insert/extract intrinsics now, can we just use them here instead of going through the load/store dance?
> I don't think it's legal to use EmitLValue here at all; the emitted IR could have side-effects.
> 
I agree since we have already visited E. 

> Since we have the vector insert/extract intrinsics now, can we just use them here instead of going through the load/store dance?

we have already use insert/extract intrinsics for same element type, we can only handle predicate cast through memory.
One of idea here is always use store + load. what do you think?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105097



More information about the cfe-commits mailing list