Skip to content

Commit 6aa86b5

Browse files
[AIE2] AIE2 custom shuffle vector mask support
1 parent 13cc82a commit 6aa86b5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

llvm/lib/Target/AIE/AIE2PreLegalizerCombiner.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "AIE2TargetMachine.h"
1717
#include "AIECombinerHelper.h"
18+
#include "MCTargetDesc/AIE2MCTargetDesc.h"
1819
#include "llvm/CodeGen/GlobalISel/CSEInfo.h"
1920
#include "llvm/CodeGen/GlobalISel/Combiner.h"
2021
#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
@@ -67,6 +68,7 @@ class AIE2PreLegalizerCombinerImpl : public Combiner {
6768
bool tryCombineAll(MachineInstr &I) const override;
6869

6970
bool tryCombineAllImpl(MachineInstr &I) const;
71+
bool tryCombineShuffleVector(MachineInstr &MI) const;
7072

7173
bool tryToCombineVectorShiftsByZero(MachineInstr &MI) const;
7274

@@ -150,6 +152,13 @@ bool AIE2PreLegalizerCombinerImpl::tryToCombineIntrinsic(
150152
return false;
151153
}
152154

155+
bool AIE2PreLegalizerCombinerImpl::tryCombineShuffleVector(
156+
MachineInstr &MI) const {
157+
if (Helper.tryCombineShuffleVector(MI))
158+
return true;
159+
160+
return false;
161+
}
153162
bool AIE2PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
154163
if (tryCombineAllImpl(MI))
155164
return true;
@@ -169,7 +178,7 @@ bool AIE2PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
169178
return tryToCombineIntrinsic(MI);
170179
}
171180
case TargetOpcode::G_SHUFFLE_VECTOR: {
172-
return Helper.tryCombineShuffleVector(MI);
181+
return tryCombineShuffleVector(MI);
173182
}
174183
default:
175184
break;

0 commit comments

Comments
 (0)