mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Fix reordering of shuffles and binary operations
Do not apply transformation:
BinOp(shuffle(v1), shuffle(v2)) -> shuffle(BinOp(v1, v2))
if operands v1 and v2 are of different size.
This change fixes PR19717, which was caused by r208488.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208518 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1120,6 +1120,7 @@ Value *InstCombiner::SimplifyVectorOp(BinaryOperator &Inst) {
|
||||
ShuffleVectorInst *RShuf = cast<ShuffleVectorInst>(RHS);
|
||||
if (isa<UndefValue>(LShuf->getOperand(1)) &&
|
||||
isa<UndefValue>(RShuf->getOperand(1)) &&
|
||||
LShuf->getOperand(0)->getType() == RShuf->getOperand(0)->getType() &&
|
||||
LShuf->getMask() == RShuf->getMask()) {
|
||||
BinaryOperator *NewBO = CreateBinOpAsGiven(Inst, LShuf->getOperand(0),
|
||||
RShuf->getOperand(0), Builder);
|
||||
|
||||
Reference in New Issue
Block a user