llvm / llvm/llvm-project

[VectorCombine] Fold binop(shuffle(V1, Mask), shuffle(V2, Mask)) -> shuffle(binop(V1, V2), Mask)

Open
#210,948 4 comments 0 reactions 1 assignee Claimed by @RKSimon View on GitHub
llvm:vectorcombine
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

InstCombine currently folds this here:
https://github.com/llvm/llvm-project/blob/acfaabebcfd10d4dbabeb54cf0c60509648fb82f/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L2590-L2605

However, we're missing an equivalent, cost driven fold in VectorCombine, which prevents some later folds occurring in the pass so we have to wait for later InstCombine run to handle it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.