Skip to content

Commit 06517d8

Browse files
[AIE2] AIE2 custom shuffle vector mask support
1 parent bed41b1 commit 06517d8

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"
@@ -57,6 +58,7 @@ class AIE2PreLegalizerCombinerImpl : public Combiner {
5758
static const char *getName() { return "AIE2PreLegalizerCombiner"; }
5859
bool tryCombineAll(MachineInstr &I) const override;
5960
bool tryCombineAllImpl(MachineInstr &I) const;
61+
bool tryCombineShuffleVector(MachineInstr &MI) const;
6062

6163
private:
6264
#define GET_GICOMBINER_CLASS_MEMBERS
@@ -84,14 +86,21 @@ AIE2PreLegalizerCombinerImpl::AIE2PreLegalizerCombinerImpl(
8486
{
8587
}
8688

89+
bool AIE2PreLegalizerCombinerImpl::tryCombineShuffleVector(
90+
MachineInstr &MI) const {
91+
if (Helper.tryCombineShuffleVector(MI))
92+
return true;
93+
94+
return false;
95+
}
8796
bool AIE2PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
8897
if (tryCombineAllImpl(MI))
8998
return true;
9099

91100
unsigned Opc = MI.getOpcode();
92101
switch (Opc) {
93102
case TargetOpcode::G_SHUFFLE_VECTOR:
94-
return Helper.tryCombineShuffleVector(MI);
103+
return tryCombineShuffleVector(MI);
95104
}
96105
return false;
97106
}

0 commit comments

Comments
 (0)