[clang] [clang] Support constexpr bitcasts between equal-size vector and integer types (PR #167016)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 03:07:05 PST 2025
================
@@ -17724,7 +17078,24 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {
case CK_HLSLAggregateSplatCast:
llvm_unreachable("invalid cast kind for integral value");
- case CK_BitCast:
+ case CK_BitCast:{
+ APValue Sub;
+ if (!Evaluate(Sub, Info, E->getSubExpr()))
----------------
tbaederr wrote:
We know the types before evaluating the subexpression, so we don't have to do this unless the sizes match.
https://github.com/llvm/llvm-project/pull/167016
More information about the cfe-commits
mailing list