[clang] [Clang] Generalize interp__builtin_ia32_shuffle_generic to handle single op permute shuffles. (PR #167236)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 11 04:11:50 PST 2025
================
@@ -12993,7 +12927,20 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
case X86::BI__builtin_ia32_pshufb256:
case X86::BI__builtin_ia32_pshufb512: {
APValue R;
- if (!evalPshufbBuiltin(Info, E, R))
+ if (!evalShuffleGeneric(
+ Info, E, R,
+ [](unsigned DstIdx,
+ unsigned ShuffleMask) -> std::pair<unsigned, int> {
+ uint8_t Ctlb = static_cast<uint8_t>(ShuffleMask);
+ if (Ctlb & 0x80) {
+ return std::make_pair(0, -1);
+ } else {
----------------
RKSimon wrote:
(style) break if-else chain
https://github.com/llvm/llvm-project/pull/167236
More information about the cfe-commits
mailing list