[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

Pol M via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 06:51:32 PST 2024


Pol Marcet =?utf-8?q?Sardà?= <polmarcetsarda at gmail.com>,
Pol Marcet =?utf-8?q?Sardà?= <polmarcetsarda at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/76615 at github.com>


================
@@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) {
   return Success(APValue(ResultElements.data(), ResultElements.size()), E);
 }
 
+static bool EvaluateVectorOrLValue(APValue &Result, EvalInfo &Info,
----------------
Destroyerrrocket wrote:

> is the name inaccurate, or is this using 'false' to mean 'failure' AND 'not a vector'?
Indeed, false is being treated as a failure and not a vector.
> It seems to me that this needs to be something like "EvaluateLValueVector" or something?
I'm not entirely sure if the way I implemented the handling of an lvalue as a parameter is even the correct way to go with, so it might very well be that the reason it sticks out is because I'm doing something wrong. I guess I'll have to wait for someone who has dealt with lvalues in constexpr to tell me where I went wrong

https://github.com/llvm/llvm-project/pull/76615


More information about the cfe-commits mailing list