[clang] 9d70975 - [clang][Interp][NFC] Remove an assertion that's too strong
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 02:39:59 PDT 2024
Author: Timm Bäder
Date: 2024-05-21T11:38:45+02:00
New Revision: 9d70975c7a72f3fa58d2d63090b92886dbf8a32b
URL: https://github.com/llvm/llvm-project/commit/9d70975c7a72f3fa58d2d63090b92886dbf8a32b
DIFF: https://github.com/llvm/llvm-project/commit/9d70975c7a72f3fa58d2d63090b92886dbf8a32b.diff
LOG: [clang][Interp][NFC] Remove an assertion that's too strong
Both types need to boil down to a vector type with the same length
and their element types need to match, but we still can't compare
them with == since they might be sugared, etc.
Added:
Modified:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 70328c1f52af3..ee83947196c6e 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -2538,8 +2538,6 @@ bool ByteCodeExprGen<Emitter>::VisitShuffleVectorExpr(
assert(E->getNumSubExprs() > 2);
const Expr *Vecs[] = {E->getExpr(0), E->getExpr(1)};
- assert(Vecs[0]->getType() == Vecs[1]->getType());
-
const VectorType *VT = Vecs[0]->getType()->castAs<VectorType>();
PrimType ElemT = classifyPrim(VT->getElementType());
unsigned NumInputElems = VT->getNumElements();
More information about the cfe-commits
mailing list